local res=assert(con:execute("CALL Procedure_name('"..parameter.."')"))
while row do
row = res:fetch ({}, "a")
endAfter this calling another query and see:
LuaSQL: error executing query. MySQL: Commands out of sync; you can't run this command nowThis error means that driver can not free result and next query can not be executed,
This happens only with procedures.
I tried
res:close()The stored procedures that give this problem may be returning multiple values as a result of your call. LuaSQL cannot handle this, or rather, just sees the first returned value. If this is a number you may not even get a cursor as your result from EXECUTE.
In SQL Server 2005 when I run into this problem I write an encapsulating procedure that in turn calls the guest of honor and then just returns what I want from its various results. In order to prevent receiving row counts as well as rows I start the encapsulating procedure with
SET NOCOUNT ON
Hope this helps. No way to know whether your problem is the same as mine.
Robert Weiss
--
You received this message because you are subscribed to the Google Groups "Kepler Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
kepler-projec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.