OutFront Forums
     Home    Register     Search      Help      Login    

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

 

Syntax error with Insert

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Syntax error with Insert
Page: [1]
 
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

(in reply to bdelahunty)
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

(in reply to ou812)
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.

(in reply to bdelahunty)
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.....

(in reply to BeTheBall)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Syntax error with Insert
Page: [1]
Jump to: 1





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