![]() |
Reading a string
Hi there!
Can anyone help me maybe with a small snippet of code. I am reading a string variable from a text file. The string may contain an aphostrophe which causes errors when I try to use it within a SQL query string command. |
I should have added the code is in VB6
|
Try checking to see if the string has any special characters before you use it in the SQL query.
|
Most databases have their own functions to escape a string so it can be used in a query. Find out what the function is in VB 6 for your database.
|
Many thanks folks. As an update I will not be importing the errant string as it duplicates other data in the database. This was my first post and I'm impressed at the quick response
|
| All times are GMT -5. The time now is 11:23 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC