[Gambas-devel] Change to gb.db.odbc to use ODBC Connection Strings.

ML d4t4full at ...176...
Mon Mar 7 18:30:38 CET 2016


On 2016-03-02 17:40, Benoît Minisini wrote:
> Le 26/02/2016 12:46, ML a écrit :
>> Benoît,
>> Hi. I'm attaching a quick and dirty main.c module for ODBC. I made
>> the changes below to the latest revision in SVN.
>> This module includes two new calls. One to get a proper record count
>> for statements (GetRecordCount()), and another for proper ODBC error
>> retrieval (reportODBCError()). I'm planning on adding the error
>> retrieval routine to most debug calls when I finally get to tidy the
>> module, so one can check what exactly went wrong with ODBC.
>> GetRecordCount() basically gets to the last record, grabs its row
>> number and returns it as the row count. It tries not to alter the
>> current rowset position. If for any reason it cannot do it (for
>> example due to having a non-scrollable rowset), it will return the
>> usual -1 for backwards-compatibility with the original
>> SQLRowCount().
>> I tested it several times with two different MSSql servers at work
>> using different FreeTDS protocol versions and even over the internet,
>> and it seems to work. If you smell anything suspicious in it, just
>> say the word!
>> Regards, zxMarce.
> Hi,
> I have just merged your changes, changing some spaces in the code, and 
> fixing the warning on 64 bits (SQLINTEGER is an int, so it requires "%d" 
> in fprintf, not "%ld").
> I think it would be better if you commit your changes directly in the 
> subversion repository.
> Regards,

Benoît,

Wow, better late than never. Just saw your response. Thank you. Still
remains the LIMIT handling and general code tidying.

Thanks a lot also for the SVN direct commit offer, I'll give it a
thought or two. I'll also get some info on SVN and how it works.
Meanwhile, since I'm not a user of SVN, just in case I'll decline: Don't
want to trash the whole of Gambas on a bad commit!

Regards,
zxMarce.





More information about the Devel mailing list