ur_cherub
asked on
Problem with OleDb.OleDbCommand.ExecuteScalar
Hi Experts,
I'm having a problem with the following piece of code.. Don't kno the reason for it and how to go bout correcting it...
-------------------------- -------
Dim Cmd1 As OleDb.OleDbCommand = New OleDb.OleDbCommand("SELECT UserName FROM Login WHERE UserName=" & txtUser.Text, Conn)
Dim userid As String = New String(CStr(Cmd1.ExecuteSc alar))
-------------------------- -------
('txtUser' is a text box and 'conn' is an OleDbConnection). The error i'm getting is
"No value given for one or more required parameters." for the second Dim statement...
pls help me out...
thank u...
I'm having a problem with the following piece of code.. Don't kno the reason for it and how to go bout correcting it...
--------------------------
Dim Cmd1 As OleDb.OleDbCommand = New OleDb.OleDbCommand("SELECT
Dim userid As String = New String(CStr(Cmd1.ExecuteSc
--------------------------
('txtUser' is a text box and 'conn' is an OleDbConnection). The error i'm getting is
"No value given for one or more required parameters." for the second Dim statement...
pls help me out...
thank u...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
very stupid of me to have left that out...
thanks a lot