Dim SQLDR As SqlClient. SqlDataReader
Dim selectcmd As SqlClient. SqlCommand
Selectcmd.Com mandText="select pcode from party where" & amp; TextBox1. Text & amp; "=pno
"Selectcmd.Com mandType=CommandType. Text
SqlConnection1. The Open () 'to Open the connection
SQLDR=selectcmd. ExecuteReader (CommandBehavior. SingleResult)
If (SQLDR. Read) Then
If (TextBox2. Text=mandText selectcmd.Com Then
DataGridView1. The Show ()
For the Show ()
Button2. The Show ()
The Else
MsgBox (" password error ", and "tip")
End the If
End the If
SqlConnection1. Close ()
Prompt every time variable "selectcmd" is used before the assignment is how to return a responsibility?
CodePudding user response:
Define variables when you need to add new keywords or use new assignment before use...