Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1059409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:10:01+00:00 2026-05-16T18:10:01+00:00

I cant see what is wrong with my SQL statement syntax code is here:

  • 0

I cant see what is wrong with my SQL statement syntax code is here:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Using Con1 As New Odbc.OdbcConnection("Driver={MySQL ODBC 5.1 Driver};Server=127.0.0.1;Database=MyGame;User=root; Password=MyPasswordWhichIWontTellYou;")
        Dim mInsertSQL As String
        mInsertSQL = "INSERT INTO Accounts (Username,Password,Str,Int,Agi,Money) VALUES ('" & txtUser.Text & "','" & txtPass.Text & "'," & Int(txtStr.Text) & "," & Int(txtInt.Text) & "," & Int(txtAgi.Text) & ",0);"
        Dim Cmd1 As New Odbc.OdbcCommand(mInsertSQL, Con1)
        Try
            Con1.Open()
            Cmd1.ExecuteNonQuery()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Using
End Sub

Just for clarity the actual insert statement is this with some data:

"INSERT INTO Accounts (Username,Password,Str,Int,Agi,Money) VALUES ('MyUsername','MyPassword',0,0,0,0)"

The error given is:

ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.1.41]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Int,Agi,Money) VALUES ('MyUsername','MyPassword',0,0,0,0)' at line 1

Thanks alot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:10:01+00:00Added an answer on May 16, 2026 at 6:10 pm

    Wild Guess: ‘Int’ as a field name may be reserved, maybe you could try another name for the field?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just can't see what's wrong with this code.. it seems to be the
I've looked over this code a zillion times and can't see anything wrong with
So I am trying to alter my sql code (see below for screenshot of
I can't see what is wrong with this SQL: UPDATE Show SET EnterOnine =
I can't see what I'm doing wrong. I think it might be one of
I can't see where I'm going wrong. I've tried everything I could think of,
Probably I do something wrong but I can't see the point of it ....
I dont really understand whats going on and cant see the difference: I'm downloaded
I am trying to start service from AsyncTask but cant see that its starts.
This is probably something really simple but I cant see what! Any images I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.