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
rutledgjAsked:
Who is Participating?
 
CodeCruiserConnect With a Mentor Commented:
Did you try seeing the actual query that is being executed after substituting the parameters?
0
 
rutledgjAuthor Commented:
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.
0
 
CodeCruiserCommented:
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?
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
rutledgjAuthor Commented:
Yes they are, and the data gets updated correctly in the database.
0
 
CodeCruiserCommented:
Ok. Show us the code from that function which is calling the SP.
0
 
rutledgjAuthor Commented:
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.
0
All Courses

From novice to tech pro — start learning today.