I have to insert address of customer into SQL Server Database/Access Database containing Double Quote
Ex:
Customer Address:
"XYZ House", New Road, Colony, City.
How to handle it in Visual Basic for Insert and Update.
Printable View
I have to insert address of customer into SQL Server Database/Access Database containing Double Quote
Ex:
Customer Address:
"XYZ House", New Road, Colony, City.
How to handle it in Visual Basic for Insert and Update.
You can escape it or use a recordset and "poke" it across ...
Use double qoutes.
e.g.
SQLStatement = "UPDATE blahblahblah...""XYZ House"", New Road, Colony, City"
Mike,
I always hesitate on giving that answer because in VBA I can never get it to work ... ADO pukes when I try that ... I end up having to open a recordset and poking the string across that way ...
Odd. I've never had a problem. Must be a "bit of bug" in the VBA compiler.
Must be ... Now I have the fun of reworking all my forms because they are too slow with using ADO in VBA ... Doesn't that sound like fun?????