Guest User

Untitled

a guest
Jun 17th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. Dim myAdapter As New MySqlDataAdapter
  2. Dim e1 As String
  3. e1 = ("Konnte keine Verbindung zum UC Server herstellen")
  4. Dim conn As New MySqlConnection()
  5. conn.Open()
  6. conn.ConnectionString = "Server=" & TextBox1.Text & ";" & "Database=" & TextBox2.Text & ";" & "User ID=" & TextBox3.Text & ";" & "Password=" & TextBox4.Text & ";" & "Pooling=false"
  7. Dim sqlquery = ("INSERT INTO `accounts` VALUES ('2', '" + TextBox1.Text + "'," + "'" + Label9.Text + "', '100', '0', '0', '0', '0', '0', '0');")
  8. Dim myCommand As New MySqlCommand()
  9. myCommand.Connection = conn
  10. myCommand.CommandText = sqlquery
  11. myAdapter.InsertCommand = myCommand
  12. Dim myData As MySqlDataReader
  13. myData = myCommand.ExecuteReader()
Add Comment
Please, Sign In to add comment