Drstein99 Posted October 31, 2003 Posted October 31, 2003 I'm updating and inserting text/string data, using SQL. I know that when I use quotation marks " I have to double them up. My problem is, I'm getting data from one table, and updating another (or inserting), I run through: string.replace( chr(34),chr(34)&(chr34) ) and sometimes it literally writes the double quotes to the table. Naturally when I go to read that data back again, it has extra quotation marks where I dont want them. Quote www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!
Moderators Robby Posted October 31, 2003 Moderators Posted October 31, 2003 When you say "getting data from one table, and updating another"... Are you doing this in a SQL statement or is it being processed through your code? The Replace() leads me to believe the latter. I would surround strings with single quotes, and when a single quote does need to be saved in the table then you can double-up on the single quotes. Quote Visit...Bassic Software
Drstein99 Posted October 31, 2003 Author Posted October 31, 2003 Ok - I figured out I was a little confused. I found out I DON'T need to double up on the double quote: " I DO need to double up on single quotes wherever sending SQL queries. This way the dbase driver can tell when it should store the field, or treat it as text like any other. I was simply confusing single quotes and double quotes. Thanks for advice. Quote www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.