|
| |
|
|
prasmile2002
Posts: 33 Joined: 2/14/2005 Status: offline
|
80040e14' - 2/28/2005 17:25:20
Hi I am using a Form that will take input from users. The query to ad the values to the database is like this: sSQL = "INSERT into [users_tbl] ([name1], [lname], [mname], [addr], [cit], [sta], [zip], [phone], [phone2], [email], [selectday], [selectmon], [selectyear], [dateapp], [pos], [IP], [res]) values ('" & _ name1 & "', '" & lname & "', '" & mname & "', '" & addr & "', '" & cit& "', '" & sta & "', '" & zip & "', '" & phone & "', '" & phone2 & "','" & email & "', '" & selectday & "', '" & selectmon & "', '" & selectyear & "', '"&Now()&"', '"&pos&"' , '"&IP&"', '" & res & "')" The res field is a memo field/data type.. When I insert values ..everything works finme..But if the values contain apostrophe (' ) eg: I tried to enter ghfsghdfasghd' "hsdgahs" . and it gave me this error Microsoft JET Database Engine error '80040e14' Syntax error (missing operator) in query expression ''ghfsghdfasghd' "hsdgahs" . ')'. Please help... Thanks Singh
|
|
|
|
cliffdeen
Posts: 155 Joined: 4/12/2004 From: Mckinney, TX Status: offline
|
RE: 80040e14' - 2/28/2005 19:06:32
Not sure why you have so many &'s and double quotes, but a normal insert into a sql database is like so: INSERT INTO USERS_TBL (NAME1], [MNAME], etc) VALUES ('::NAME1::', '::MNAME::', etc) Note: insert names and values MUST match.
|
|
|
|
prasmile2002
Posts: 33 Joined: 2/14/2005 Status: offline
|
RE: 80040e14' - 3/1/2005 14:21:06
Thanks..that works.. Singh
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|