As usual, i suck when it comes to sql statements, and once again, i have a problem i am hoping i can get fixed. I know in php the statement is like so:
but whats the the right syntax for this in vb.net?
I want to insert this statement under these in the screenshot:
![Name: Screenshot_3.png
Views: 39
Size: 12.7 KB]()
And this is the table i want to write the guid in to:
![Name: Screenshot_4.png
Views: 7
Size: 38.7 KB]()
zeds is the database table. To be clear, i wanted to insert each as a new row, like GuidTextBox.Text under JoeBlogs
Can someone tell me how I should be writing this please?
The above code will work for anyone looking to do same thing. My problem was, in my loooonnnnnggg list of code, was this which was killing my sub because the setting was stored in the program settings before it was reloaded on the form.
Face palm :D:D:D
Code:
"INSERT INTO 'mydatabasename'.'zeds' (@guid);", MysqlConnCode:
MysqlConn = New MySqlConnection()
MysqlConn.ConnectionString = "server=#; user id=#; password=#; database=#" 'Hashed out for the post
MysqlConn.Open()
'Add sql commands
Dim cmd As New MySqlCommand("INSERT INTO 'zeds' (@guid);", MysqlConn)'
cmd.Parameters.AddWithValue("@guid", GuidTextBox.Text)
'MsgBox(SelItem & " Was Imported")
cmd.ExecuteNonQuery()
MysqlConn.Close()And this is the table i want to write the guid in to:
zeds is the database table. To be clear, i wanted to insert each as a new row, like GuidTextBox.Text under JoeBlogs
Can someone tell me how I should be writing this please?
Quote:
The above code will work for anyone looking to do same thing. My problem was, in my loooonnnnnggg list of code, was this which was killing my sub because the setting was stored in the program settings before it was reloaded on the form.
Code:
If GuidTextBox.Text = My.Settings.GUID Then
Exit Sub
End If