Returning value from stored procedure

  • Thread starter Thread starter Teo
  • Start date Start date
T

Teo

Hi, I created a stored procedure that checks login and password and returns
a Count on a variable. How do I import this variable into my VB code so I
can run a check based on it?
I tried doing the cm.Parameters.Add(@variablename) but it doesn't seem to
work. I also did the
cm.Parameters(@variablename).Direction = Output
but it doesn't work either.
What is the best way to do this?
Teo
 
See my MSDN article on handling Stored Procedure parameters.
http://www.betav.com/msdn_magazine.htm

hth

--
____________________________________
Bill Vaughn
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Hey Stephen, I tried that, but I don't know why I keep getting a value of 0,
even though there is a match in both variables when I run the stored
procedure.

Teo
 
Teo,
Appears the error is in your StoredProcedure.
Post it and I'll have a look
Stephen
 
Back
Top