[Gambas-devel] Change to gb.db.odbc to use ODBC Connection Strings.
gambas at ...1...
Mon Mar 7 18:39:23 CET 2016
Le 07/03/2016 18:30, ML a écrit :
> On 2016-03-02 17:40, Benoît Minisini wrote:
>> Le 26/02/2016 12:46, ML a écrit :
>>> 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
>>> 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.
>> 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.
> 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!
This is why we use SVN : you can rollback any change, and have a history
of all of them.
Just create an account on sourceforge and give me your user name, and I
will grant you a write access.
Then read the "How to deal with Subversion" page on the wiki.
More information about the Devel