Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-05

ODBCConn patch: UpdateIndexDefs etc.

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bram Kuijvenhoven

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

Reply by email

Bram Kuijvenhoven
to Bram Kuijvenhoven
Bram Kuijvenhoven wrote
Attached is a patch that implements TODBCConnection.UpdateIndexDefs. I tested it with a TDBGrid; SQLQuery.ApplyUpdates now works with TODBCConnection!

An updated patch is attached to this bugreport: http://www.freepascal.org/mantis/view.php?id=8822.

It also re-implements Blob support for ODBCConn & fixes TBufDataset such that it frees blob buffers now.

The patch is made against trunk; please commit it!

Regards,

Bram

Reply by email

Michael Van Canneyt
to Bram Kuijvenhoven
Bram Kuijvenhoven wrote 12 lines
Bram Kuijvenhoven wrote: > Attached is a patch that implements TODBCConnection.UpdateIndexDefs. I > tested it with a TDBGrid; SQLQuery.ApplyUpdates now works with > TODBCConnection! An updated patch is attached to this bugreport: http://www.freepascal.org/mantis/view.php?id=8822. It also re-implements Blob support for ODBCConn & fixes TBufDataset such that it frees blob buffers now. The patch is made against trunk; please commit it!

Patch applied, thanks !

Michael.

Reply by email