Syntax error

  • Thread starter Thread starter middletree
  • Start date Start date
M

middletree

For an ASP application, I am using a simple INSERT statement. What's wrong
with this query?

INSERT INTO Login(Name,Password,Pastor) VALUES ('Bob','whatever','y')

Seems pretty straightforward. Using Access 2003. I've checked the obvious
things, liek the tablename and field names being spelled correctly. My
connection is good, because I am using it to do all sort of other things,
but this insert statement is throwing me this message, where line 24 is the
execute line:

Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
/shape/addLogin.asp, line 24
 
Hi Middletree,

Try enclosing reserved words in brackets.....
I think only "Pastor" is not a reserved word. 8-)

Good luck,

Gary Walter
 
The 'y' looks a bit suspicious.

Is it a Boolean Field? If it is, you need to pass True or
False, not 'y'.

Check and make sure you pass the correct value types for
all Fields.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top