[Gambas-user] Could be this change included?

Benoit Minisini gambas at ...1...
Wed Feb 21 13:37:19 CET 2007


On mardi 20 février 2007, Leandro Anthonioz Blanc wrote:
> Hi folks. I needed get a resultset from a MySQL stored procedure. However,
> when I execute a line like this:
>
> hResult = hConn.Exec("CALL MyStoredProcedure(2)")
>
> I get the following error:
>
> "PROCEDURE MyStoredProcedure can't return a result set in the given
> context"
>
> Later, I read in MySQL documentation ("24.2.9. C API Handling of Multiple
> Statement Execution") this:
>
> "The mysql_real_connect() function has a flags argument for which two
> option values are relevent: * CLIENT_MULTI_RESULTS enables the client
> program to process multiple results. This option must be enabled if you
> execute CALL statements for stored procedures that produce result sets.
> Otherwise, such procedures result in an error Error 1312 (0A000): PROCEDURE
> proc_name can't return a result set in the given context."
>
> Therefore, I edit open_database() function in gb.db.mysql/src/main.c file.
> I modify the mysql_real_connect call changing last argument (0) to
> CLIENT_MULTI_RESULTS constant and works fine. Could be this change included
> in future versions of Gambas please? Thank you very much.
>

Done in the SVN trunk!

-- 
Benoit Minisini




More information about the User mailing list