|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem in SQl Querry
Hi !!!
I am using VB & MS Acess. I have written querry - qry="Select * fom Sustomers Where CustomerName='" & CName & "'" this querry works well , but fails if CName="D'xyzgff" So the problem coz of the characte ' How should I correct my querry Thanks |
|
#2
|
||||
|
||||
|
hi, a single quote is illegal in that context
![]() use the following to correct it: Code:
qry="Select * fom Sustomers Where CustomerName='" & replace(CName,"'","''") & "'" hope this helps
__________________
Look! Its a ShemZilla ![]() ![]()
|
|
#3
|
||||
|
||||
|
very fast NF...........
|
|
#4
|
||||
|
||||
|
hehe, I've got the weekend energy taking over slowly
![]() |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Problem in SQl Querry |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|