[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-devel
Subject:    Re: [Gambas-devel] Change to gb.db.odbc to use ODBC Connection Strings.
From:       ML <d4t4full () gmail ! com>
Date:       2016-02-26 11:46:33
Message-ID: 56D03B19.2040102 () gmail ! com
[Download RAW message or body]

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.


["gb.db.odbc-main.c.tar.gz" (application/gzip)]

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140

_______________________________________________
Gambas-devel mailing list
Gambas-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic