Link to home
Start Free TrialLog in
Avatar of rutledgj
rutledgj

asked on

Calling mysql stored proc from vb.net

I have an app that I'm trying to call a mysql stored proc and return an integer values. The proc always returns 1.  If I exec the proc from within a query window in mysql it returns a -5 (for update).

I've attached the code for the proc and vb call. I know it would be easier to use the mysql connector stuff but I'm not allowed to.

The mysql version is 5.0.91

Thanks
vbCode.txt
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rutledgj
rutledgj

ASKER

I'm not sure I know what you mean. Did I see the query?  If you mean did the query execute then yes it did. It just didn't return the correct value as I expected.
What I meant is if you put a break point on the function where you are passing your command and hover over the parameter, does the command look ok? Are the parameters in in correct sequence?
Yes they are, and the data gets updated correctly in the database.
Ok. Show us the code from that function which is calling the SP.
Actually, I just found my problem. The call I was making to our common db class was sending it through an executenonquery instead of the executescalar as it should have.  I just assumed it worked correctly but I didn't write that part.