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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"....error in INSERT INTO ...." 2

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US
2147217900
Syntax error in INSERT INTO statement.
Microsoft JET Database Engine
INSERT INTO UserLogon (UserName, Password, Email) values ('kbkby', 'kbkbk','kb@kb.com')

that above is the error I get when I check my Err object.
and the SQL string it tried to execute is also posted, the three sections in that table are all text types.

this is the table structure

UserName - Text
Password - Text
Email - Text
UserID - AutoNumber (also Primary Key)
UserStatus - Text

I type the above SQL String into the Query mode in Access, and it adds it just fine. But in ASP it says that Error, and I cant figure out, what it means by syntax error, since everything seems just perfect. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
Can you show the ASP that is producing:

INSERT INTO UserLogon (UserName, Password, Email) values ('kbkby', 'kbkbk','kb@kb.com')




br
Gerard
 
Try encapsulating the field names in brackets. Username, password, or email may be an access reserved word, and IIRC, username() is an access function to retrieve the username of the current connection, which would explain the syntax error.

INSERT INTO UserLogon ([UserName], [Password], ) values ('kbkby', 'kbkbk','kb@kb.com') Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top