|
| |
|
|
bdelahunty
Posts: 37 Joined: 10/15/2004 Status: offline
|
Syntax error with Insert - 4/23/2005 19:24:47
Can someone please help me with this syntax error. The insert works fine when I remove the variable CID. mySQL= "INSERT INTO Appts "
mySQL= mySQL & "(clientID,apptdt,appttm,appt,comments) "
mySQL= mySQL & "VALUES (" & cid & " & "','"
mySQL= mySQL & Request.Form("apptdt") & "','"
mySQL= mySQL & Request.Form("appttm") & "','"
mySQL= mySQL & Request.Form("appt") & "','"
mySQL= mySQL & Request.Form("comments") & "')" I keep getting this error msg.... Microsoft JET Database Engine error '80040e14' Syntax error (missing operator) in query expression '& mm/dd/yyyy','00:00pm','Reiki','')'. /massage/admin/appt_insert.asp, line 27 Thanks
|
|
|
|
ou812
Posts: 1728 Joined: 1/5/2002 From: San Diego Status: offline
|
RE: Syntax error with Insert - 4/23/2005 20:32:08
It looks like you have an extra quote and ampersand. Try this instead: mySQL= mySQL & "VALUES (" & cid & " ',' "
_____________________________
-brian Black Holes suck. EnterpriseDB: Enterprise-class relational database management system PostgreSQL: The world's most advanced open source database
|
|
|
|
bdelahunty
Posts: 37 Joined: 10/15/2004 Status: offline
|
RE: Syntax error with Insert - 4/23/2005 21:39:42
Thanks, I tried it and am now getting this error... Microsoft JET Database Engine error '80040e14' Syntax error (missing operator) in query expression '','mm/dd/yyyy','00:00pm','Massage','')'. /massage/admin/appt_insert.asp, line 27
|
|
|
|
BeTheBall
Posts: 6485 Joined: 6/21/2002 From: West Point Utah USA Status: offline
|
RE: Syntax error with Insert - 4/23/2005 21:58:01
Give this a go: mySQL= "INSERT INTO Appts " mySQL= mySQL & "(clientID,apptdt,appttm,appt,comments) " mySQL= mySQL & "VALUES (" & cid & "," mySQL= mySQL & "'"& Request.Form("apptdt") & "'," mySQL= mySQL & "'"& Request.Form("appttm") & "'," mySQL= mySQL & "'"& Request.Form("appt") & "'," mySQL= mySQL & "'"& Request.Form("comments") & "')"
_____________________________
Duane Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.
|
|
|
|
bdelahunty
Posts: 37 Joined: 10/15/2004 Status: offline
|
RE: Syntax error with Insert - 4/23/2005 22:53:13
Thanks Duane. It works like a charm.....
|
|
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
|
|
|