Click to See Complete Forum and Search --> : Can't make SQL sytax work with ASP


NatuScape
08-13-2004, 03:40 PM
Hello all,

I'm trying to type an SQL query into an ASP page and somehow I'm hitting a problem that I hadn't encountered before and have no idea how to fix!! The query is an INSERT INTO and my problem is that some of the values I'm inserting have commas in them so when I go to parse the query, I get an error. I tried using "" instead of the ', but I knew that wasn't such a good idea, and it didn't work.

How do I tell the query to insert a text value in a field when that valua has a comma inside it? I really need those commas!!

Thanks a million and happy Friday the 13th everyone!

Natalia

CardboardHammer
08-13-2004, 04:33 PM
sql = "INSERT INTO sometable (field1, field2) VALUES ('to be, or not to be', 'not to be')"