Skip to Content.
Sympa Menu

freetds - ODBC SQLBindCol Segment Violation

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Varley, David(CBorn at Alcoa)" <David.Varley AT alcoa.com.au>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: ODBC SQLBindCol Segment Violation
  • Date: Tue, 24 Jul 2001 10:47:06 +0800



I don't know how many of you are using ODBC, but here's a problem I've just
tracked down.

SQLBindCol should be callable on a statement before any results are
returned.
This works on Windows, but at present FreeTDS doesn't allocate the res_info
for column bindings until after result set is returned, and you get a
segment violation. Moving the column binding after the result set is
returned
gets around it. I assume a fix would involve checking for a valid res_info
in
SQLBindCol, and creating it if not found, but I'm not sure enough about the
overall structure, how thing hang together and why. I think the res_info
may be cleared when the results come in anyway, which would make this
pointless,
it appears to be a lifetime-scope issue. Should the bindings be kept in a
separate
persistent structure attached to the statement, or should the results info
use be
modified ?

Cheers,

David



Alcoa World Alumina Australia is a trading name of Alcoa of Australia
Limited, ACN 004 879 298





Archive powered by MHonArc 2.6.24.

Top of Page