thanks for this jm..
but can you do a explanation in this code..
vb Code:
Dim command As New OleDb.OleDbCommand("SELECT * FROM tblUserAccount WHERE Username = '" & txtUserName.Text & "' AND Password = '" & txtPassword.Text & "'", _ connection) With command.Parameters .AddWithValue("Username", txtUserName.Text) .AddWithValue("Password", txtPassword.Text) End With connection.Open() 'Execute the query. If CInt(command.ExecuteScalar()) = 0 Then MsgBox(" failed Login") Else main.Show() End If
sorry new in vb.net
what is the use of this code
command.Parameters
.AddWithValue
CInt(command.ExecuteScalar()) = 0
thanks




Reply With Quote