lidds Posted April 25, 2005 Posted April 25, 2005 I have the following SQL statement that I am trying to use within an asp page. INSERT INTO RegDetails (user_name, password, name, email, make_of_car, model_of_car, year_of_manufacture, post_code, age, news_letter, user_type) VALUES ('lidds','dragnet','simon','simon@','toyota','supra','1997','rg29ab','17-25','Yes','private') The SQL statement works fine when run out side of my asp page, the asp page code is: Dim objConn Set objConn = CreateObject("ADODB.Connection") objConn.connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\sites\Single7\mofomos\database\mofomos.mdb;User ID=;Password=;" objConn.open Dim strQ strQ = "INSERT INTO RegDetails (user_name, password, name, email, make_of_car, model_of_car, year_of_manufacture, post_code, age, news_letter, user_type) VALUES ('lidds','dragnet','simon','simon@','toyota','supra','1997','rg29ab','17-25','Yes','private')" objConn.Execute strQ objConn.close the following error is then produced: Microsoft JET Database Engine error '80040e14' Syntax error in INSERT INTO statement. /html/regdetails_form_private_action.asp, line 92 Can anyone help as this driving me mad. Cheers Simon Quote
eramgarden Posted April 25, 2005 Posted April 25, 2005 Can you put a debug step on strQ and grab the value and run that outside your app (In Query Analyzer something)? Quote
HJB417 Posted April 26, 2005 Posted April 26, 2005 http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=81 place the column name 'password' in [ ] e.x.: INSERT INTO [RegDetails] ([user_name], [password], [name], ... Quote
lidds Posted April 26, 2005 Author Posted April 26, 2005 Thanks a lot HJB417 Work a treat Simon Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.