Further to my previous post concerning apostrophes, I've discovered that it's not the VBScript thats catching the apostrophes but the SQL which inserts a text string into a table. When the text string contains an apostrophe, the SQL takes the apostrophe as the end of a value ie
INSERT INTO mytable (mycolumn) VALUES ('mytext's')
which obviously causes problems. "mytext's" comes straight from a textbox, but does anyone know how to strip out a character from a textstring bearing in mind an apostrophe in VBScript would be taken as a comment? that way i could intercept the value, take out the apostrophe and pass it to the SQL. Or do I have to strip out the apostrophe clientside using javascript or something - and how would i do this? Any help at all would be great, I'm hoping there is a really simple way that i don't know.
Thanks
Dusty
INSERT INTO mytable (mycolumn) VALUES ('mytext's')
which obviously causes problems. "mytext's" comes straight from a textbox, but does anyone know how to strip out a character from a textstring bearing in mind an apostrophe in VBScript would be taken as a comment? that way i could intercept the value, take out the apostrophe and pass it to the SQL. Or do I have to strip out the apostrophe clientside using javascript or something - and how would i do this? Any help at all would be great, I'm hoping there is a really simple way that i don't know.
Thanks
Dusty