|
-
Quotes (") in Visual Basic String...
Hey guys...This is ridiculous. I'm trying to put quotes in a string. What I have been doing is:
strQuery = "select * from tblCustomers where tblCustomer.Cust_Id = \"" & text1(2) & "\""
Is this correct? I thought you used \". However.... I tried this to find out.
strQuery = "select * from tblCustomers where tblCustomer.Cust_Id = \"" & text1(2)
I hit enter to finish the line and it gave me:
strQuery = "select * from tblCustomers where tblCustomer.Cust_Id = \"" & text1(2)"
The strQuery is defined and all of that. I've tried hardcoding the above query (with the " " around the correct value) into the control and it works fine. Thanks a lot!!
-=-Neal Alvey
------------------
...NeAlvey, the world's best Sim Farm player EVER...and you should know that!
-
try this
strQuery = "SELECT * FROM tblCustomers WHERE tblCustomer.Cust_Id = '" & text1(2) & "'"
[This message has been edited by cyrustch (edited December 02, 2001).]
-
Yeah, I tried that as well but had no luck. However, I did use chr$(34) command to convert the ascii value to a character and it works like a dream. Thanks for the reply!
-=-Neal
------------------
...NeAlvey, the world's best Sim Farm player EVER...and you should know that!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|