Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Database
MS Access
Syntax error in INSERT INTO statement
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="KenQui, post: 186318, member: 75898"] What is wrong in my code below? How to fix the error? Private Sub AddAdmin() ' ADD PARAMETERS aAccess.AddParam("@admin_no", txtANo.Text) aAccess.AddParam("[USER=26928]@username[/USER]", txtAUsername.Text) aAccess.AddParam("@password", txtAPassword.Text) ' EXECUTE INSERT COMMAND aAccess.ExecQuery("INSERT INTO db_admin (Admin_No,Username,Password) " & _ "VALUES (@admin_no,@username,@password); ") ' REPORT & ABORT ON ERRORS If Not String.IsNullOrEmpty(aAccess.Exception) Then MsgBox(aAccess.Exception) : Exit Sub ' SUCCESS!! MsgBox("The book was added successfully") Me.RefreshGrid() End Sub [/QUOTE]
Insert quotes…
Verification
Post reply
Database
MS Access
Syntax error in INSERT INTO statement
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom