helLO
04-12-2003, 03:55 PM
I'm new at this... Sorry for asking too many questions...
Code 1:
ABC = Replace(ABC, "'", "''")
----------------------------------------------------------------
Code 2:
SQL_Stat = "SELECT * " _
& "FROM Test " _
& "WHERE No LIKE '%" & Replace(ABC, "'", "''") & "%' " _
& "OR Name LIKE '%" & Replace(ABC, "'", "''") & "%' " _
-------------------------------------------------------------------
For code 1: What does <replace> mean and do? What is <ABC, "'", "''"> do? Is it replacing ABC into " " or vice versa? Is this statement a form of declaration?
-------------------------------------------------------------------
For code 2: What is the <replace> for? Does it has the same meaning as the 1st code? What is <%> and <_> for? Is the <&> used there for concatenation purpose? What is the <LIKE> for?
Thanks...
Code 1:
ABC = Replace(ABC, "'", "''")
----------------------------------------------------------------
Code 2:
SQL_Stat = "SELECT * " _
& "FROM Test " _
& "WHERE No LIKE '%" & Replace(ABC, "'", "''") & "%' " _
& "OR Name LIKE '%" & Replace(ABC, "'", "''") & "%' " _
-------------------------------------------------------------------
For code 1: What does <replace> mean and do? What is <ABC, "'", "''"> do? Is it replacing ABC into " " or vice versa? Is this statement a form of declaration?
-------------------------------------------------------------------
For code 2: What is the <replace> for? Does it has the same meaning as the 1st code? What is <%> and <_> for? Is the <&> used there for concatenation purpose? What is the <LIKE> for?
Thanks...