Transaction getting stuck in SQLBindCol

Matthew Gates <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <84F1FFCF43457A4B89A4ED49C998C4E2FC0A7F54@redofmail01.office.redeu.local>
My program is sometimes getting stuck in a call to SQLBindCol.  It's rare - of the order of one call in two million - and variable.  I can't run with any sort of verbose debugging, so I plan to instrument the SQLBindCol function to find where the problem is.

SQLBindCol is called twice - once for a SQL_C_SLONG and once for a SQL_C_CHAR string (which can be quite long - sometimes more than 1000 characters in length).  I'm working to determine which call it is and the exact length of the requested string when the problem occurs, but it's very slow going since I have to instrument up the binary and then wait a long time for the problem to occur.

Does anyone have any hints of what to look for?  I'm afraid I don't really understand what is going on at this low level.  When SQLBindCol is called, is any connection to the database required which might be blocking due to a sporadic network issue?  Where else might a problem lie?

The result of this stuckness is that the connection gets killed from the database end.  At this point the SQLBindCol call returns (without error in fact), and the process continues.  I don't know if that lack of detection of a problem is relevant or not.


Regards,
Matthew



Disclaimer

This email transmission is confidential and intended solely for the person or organisation to whom it is addressed. If you are not the intended recipient, you must not copy, distribute or disseminate the information, or take any action in reliance of it. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of any organisation or employer. If you have received this message in error, do not open any attachment but please notify the sender (above) deleting this message from your system.
______________________________________________________________
This message has been scanned for all viruses by BTnet VirusScreen.
The service is delivered in partnership with MessageLabs.

This service does not scan any password protected or encrypted
attachments.

Retail Decisions Ltd.; Registered Office: ReD House, Brookwood, Surrey GU24 0BL; Company Number: 3885583
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.