I'm getting an error I don't understand....
Here's my Code:
Dim dr As SqlDataReader
Dim retVal As Boolean = False
Dim MySQL as string = "spGetEmplo yee"
Dim Myconn as New
SQLConnection(C onfigurationSet tings.AppSettin gs("EmpLogin") )
Dim Cmd as New SQLCommand(MySQ L, MyConn)
cmd.CommandType =CommandType.St oredProcedure
cmd.parameters. add(New SQLParameter("@ Login", txtUID.text))
cmd.parameters. add(New SQLParameter("@ Password", txtPWD.text))
cmd = New SqlCommand(MySQ L, MyConn)
MyConn.Open()
dr = cmd.ExecuteRead er()
But on that last line (executeReader) , I get this error:
Procedure 'spGetEmployee' expects parameter '@Login', which was not supplied
What am I doing wrong?
Here's my Code:
Dim dr As SqlDataReader
Dim retVal As Boolean = False
Dim MySQL as string = "spGetEmplo yee"
Dim Myconn as New
SQLConnection(C onfigurationSet tings.AppSettin gs("EmpLogin") )
Dim Cmd as New SQLCommand(MySQ L, MyConn)
cmd.CommandType =CommandType.St oredProcedure
cmd.parameters. add(New SQLParameter("@ Login", txtUID.text))
cmd.parameters. add(New SQLParameter("@ Password", txtPWD.text))
cmd = New SqlCommand(MySQ L, MyConn)
MyConn.Open()
dr = cmd.ExecuteRead er()
But on that last line (executeReader) , I get this error:
Procedure 'spGetEmployee' expects parameter '@Login', which was not supplied
What am I doing wrong?
Comment