...

View Full Version : Insert comma in MS Access



Khaled
01-15-2007, 07:55 PM
Hello everybody...

I am trying to insert a string variable with INSERT SQL statement into MS Access database.

This variable contains a comma(,).

When execute SQL statement, it cause a syntax error, although I can insert commas in database directly without any problem.

Is there a solution for this error ?

Thank you for any help.

Baleric
01-16-2007, 05:40 AM
can you show code...

or you can replace the comma before it goes intot the database and then when you call it out you can replace it again, or stick it in quotes...

show your code its alot easier

npala2001
01-23-2007, 04:58 PM
Are you looking for this? This should let you insert data into an access database that contains commas.


formvalue=replace(request.form("formvalue"),"'","''")

degsy
01-30-2007, 02:22 PM
Are you looking for this? This should let you insert data into an access database that contains commas.


formvalue=replace(request.form("formvalue"),"'","''")
That code does nothing to effect commas.

angst
01-30-2007, 02:38 PM
commas should be inserted no problem, just make sure that for any varChar strings, to use single quotes around the data, like '" & string & "'



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum