update pincode
i have make this code for update database.but it have something problem.can someone pro solve my issue.i am newbie.
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
conn.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Documents and Settings\Prokiller\Desktop\123\AccountName.mdb"
conn.Open()
command.CommandText = "SELECT * FROM tblAccountName WHERE [UserName] = '" & txtUserName.Text & "' AND PinCode= '" & txtPinCode.Text & "';"
command.Connection = conn
da.SelectCommand = command
da.Update(ds, "AccountName")
Dim count = ds.Tables(0).Rows.Count
If count > 0 Then
MsgBox("Accepted", MsgBoxStyle.Information)
Else
MsgBox("invalid", MsgBoxStyle.Critical)
End If
conn.Close()
End Sub
i have make this code for update database.but it have something problem.can someone pro solve my issue.i am newbie.
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
conn.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Documents and Settings\Prokiller\Desktop\123\AccountName.mdb"
conn.Open()
command.CommandText = "SELECT * FROM tblAccountName WHERE [UserName] = '" & txtUserName.Text & "' AND PinCode= '" & txtPinCode.Text & "';"
command.Connection = conn
da.SelectCommand = command
da.Update(ds, "AccountName")
Dim count = ds.Tables(0).Rows.Count
If count > 0 Then
MsgBox("Accepted", MsgBoxStyle.Information)
Else
MsgBox("invalid", MsgBoxStyle.Critical)
End If
conn.Close()
End Sub