Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax error in INSERT INTO statement

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
I am getting this error description in the following script

'--- START SCRIPT ----
strQuery="INSERT INTO Product(ProductId,ProductName,Mcat,MCategory,Price,Pstatus,Pdesc,Image,PCon) VALUES(3001,'Pantene Pro V','Shampoos',90,'Y',' ',' ','Y')"

adoConn.Execute strQuery
vbserror=err.number
errcount=adoconn.errors.count
IF errcount>0 then
DBErrNum=adoconn.errors(0).number
DBErrDes=adoconn.errors(0).description
Response.Write dberrnum & &quot;<br>&quot;
Response.Write dberrdes & &quot;<br>&quot;
End if

'----END SCRIPT----
adoconn is a connection string for the database .. and I can read from the database very well.. also the script is working fine on my local IIS server.. just does not work on the online one

Any solutions??
 
Is your MCategory field a string of number field? If it is not a number it shold be surrounded by quotes. Steve Davis
hey.you@hahaha.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top