Hi!
Attached is a patch that implements TODBCConnection.UpdateIndexDefs. I tested it with a TDBGrid; SQLQuery.ApplyUpdates now works with TODBCConnection!
I zipped it to reduce the size. There are two patches:
odbcsql.inc:
- added SQLStatistics function and some associated constants
odbcconn.pas:
- implemented TODBCConnection.UpdateIndexDefs
- free Connection handle if connecting fails; fixes exception thrown on finalization if a connection failed
- added FmtArgs parameter to ODBCCheckResult; now a call to Format is needed only when an error actually occurred
- if SQLGetDiagRec failed in ODBCCheckResult, this is reported in the constructed error message
BTW I started a page on the wiki about ODBCConn at http://wiki.freepascal.org/ODBCConn.
Regards,
Bram
