Private cad As String
Private cnn As New MySqlConnection
Private da As MySqlDataAdapter
Private ds As DataSet
Private query As String
Consultas sql
cad = "Database=prueba;Data Source=localhost;User Id=root;Password=system"
cnn = New MySqlConnection(cad)
query = "select * from usuario"
da = New MySqlDataAdapter(query, cnn)
ds = New DataSet
da.Fill(ds, "general")
Dim i As Integer
Dim n As Integer
n = ds.Tables("general").Rows().Count
i = 0
While (i <>
If (ds.Tables("general").Rows(i).Item(0) = TextBox1.Text) And (ds.Tables("general").Rows(i).Item(1) = TextBox2.Text) Then
Label3.Text = "Ok"
Else
MsgBox("error")
End If
i = i + 1
End While
----
Insersion
No comments:
Post a Comment