lecosson / assql

Automatically exported from code.google.com/p/assql
0 stars 0 forks source link

Variable not returned as described from a call to a stored procedure #73

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Pretty much exactly the code in the example for stored procedures 

What is the expected output? What do you see instead?
I get a mysqlResponse data type returned rather than a mysqlOutputParams
data type.

What version of the product are you using? On what operating system?
Beta 2.7 - Using Source Directly (not SWC) - on Windows Vista (.. its a
company laptop)

Please provide any additional information below.
The code I'm using it as follows - I've essentially mimicked the code shown
in the examples and just replace the SQL for the call and the variable name
(cNewID which it the "output parameter")...

st.registerOutputParam("@cNewID");
st.sql = "CALL getnewIDP(@cNewID,'NOTIFYALERTINBOX')";
token = st.executeQuery();

The variable does get set - I use it in the following insert statement and
the value is there.

Also - in the documentation it talks about "registerOutputParameter" and
not the actual method that exists in code "registerOutputParam".

Can I also just say I'm really impressed with this project - really great
job so far! Brutal need for some more example and installation
documentation, one day I'll volunteer some stuff...

Original issue reported on code.google.com by celeryn...@gmail.com on 26 Feb 2009 at 2:56

GoogleCodeExporter commented 9 years ago
Actually - this was an easy fix on further investigation and was just to do 
with the
capital letters in the call statement ie: CALL not call. I changed one line in 
the
executeQuery method in the Statement class to fix the problem.

from if ( this.sql.indexOf("call") == 0 )
to if ( this.sql.toLocaleLowerCase().indexOf("call") == 0 )

Original comment by celeryn...@gmail.com on 31 Mar 2009 at 6:02

GoogleCodeExporter commented 9 years ago

Original comment by celeryn...@gmail.com on 20 May 2009 at 12:44

GoogleCodeExporter commented 9 years ago
Committed to subversion 178

Original comment by celeryn...@gmail.com on 24 May 2009 at 9:21