Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27443

VS 2010 [RESOLVED] Insert Into MySQL

$
0
0
Ok, so you helped me check the database, now I need help inserting into it lol:

Code:

                    Using Command As MySqlCommand = Connection.CreateCommand
                    Try
                        Command.CommandText = "INSERT INTO HWID (111) VALUES (@IP)"
                        Command.Parameters.AddWithValue("@IP", "TestIP")
                        Command.ExecuteNonQuery()
                    Catch ex As MySqlException
                        MsgBox(EX.ToString)
                    End Try
                End Using

Ok, so my table name is "HWID" and my Column name is "IP". I want to insert "TestIP" into my table, but I get the sql exception error. I think it has to do with the "@IP" parenthesis. I don't know what to put there.

Viewing all articles
Browse latest Browse all 27443

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>