Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Try
  2. If connection.State = ConnectionState.Closed Then
  3. connection.Open()
  4. End If
  5. Dim cmd As New OleDbCommand("insert into Table1(Email,[Password]) Value(?,?)", connection)
  6. cmd.Parameters.AddWithValue("@1", OleDbType.VarChar).Value = Email.Text
  7. cmd.Parameters.AddWithValue("@1", OleDbType.VarChar).Value = Passwordtillogin.Text
  8.  
  9. cmd.ExecuteNonQuery()
  10. connection.Close()
  11.  
  12. MsgBox("Profil er nu oprettet", MsgBoxStyle.Information)
  13. Catch ex As Exception
  14. MsgBox(ex.Message)
  15. End Try
  16. End If
  17. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement