By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,509 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,509 IT Pros & Developers. It's quick & easy.

insert into error

P: 15
I have the following code in vb.net aplication. It is simply trying to save user info into a table :

strSQL = "insert into Users (UserName,Password,SecurityLevel,Active) Values ('jasontest','serewrwf',2,Yes)"
rs = cn.Execute(strSQL)

I get an error saying that I have a syntax error when I run it from vb.net application, but it works fine if I run it in access???

Any suggestions?

Thanks
Jul 24 '07 #1
Share this Question
Share on Google+
2 Replies


puppydogbuddy
Expert 100+
P: 1,923
I have the following code in vb.net aplication. It is simply trying to save user info into a table :

strSQL = "insert into Users (UserName,Password,SecurityLevel,Active) Values ('jasontest','serewrwf',2,Yes)"
rs = cn.Execute(strSQL)

I get an error saying that I have a syntax error when I run it from vb.net application, but it works fine if I run it in access???

Any suggestions?

Thanks
The VB.NET application user/administrator probably needs to have the FULL rights to the shared folder which the access database located in order to do inserts, updates, and deletes.
Jul 24 '07 #2

P: 15
It turned out to be the password field. I changed the name to UserPassword and it worked. Still don't know why it woeks in access, but not when sent as a SQL string from vb.net.
Jul 25 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.