[Gambas-user] [Gambas Bug Tracker] Bug #1113: ODBC driver problem: driver connects but does not exec query

bugtracker at ...3416... bugtracker at ...3416...
Wed Jun 21 04:00:57 CEST 2017


http://gambaswiki.org/bugtracker/edit?object=BUG.1113&from=L21haW4-

Comment #12 by zxMarce:

I'm on it, already fixed, but the way I fixed it not only is not elegant, but also plain ugly. 

I would like to get Benoît's opinion on this as well, because the patch consists in changing a return code from an ODBC subsystem call so the Gambas call does not fail (as I said already, the query is run, but ODBC returns a code that was not being taken into account). 

When the query is run by ODBC and returns rows, the return code is SQL_SUCCESS. When the query runs but there's no data to retrieve, the same call responds SQL_NO_DATA. These constants' values are obviously different. The patch simply forces SQL_NO_DATA to be SQL_SUCCESS, but I simply tried a coupla queries, I don't really know if this "solution" covers all cases. 

zxMarce.






More information about the User mailing list