0
votes
Vote UpVote

Six months in a leaky boat

Idle Musings of a Delphi Junkie – Yesterday I discovered a potential resource leak when using the dbExpress Ado.NET provider, which can cause connections to be created and never freed. This leak was discovered when I implemented and started consuming a helper method which allows me to easily determine whether a data reader contains a specified column. class method DbUtils.ColumnExists(AReader: DbDataReader; AColumnName: String): Boolean; begin   var Table: DataTable := AReader.GetSchemaTable;   Table.DefaultView.RowFilter := String.Format('ColumnName =''{0}''', AColumnName);   Result := (table.DefaultView.Count > 0) end; ...
Favorite? Off-Topic? David Clegg @ 2010-03-11 20:56

Statistics

Visits: 466
Votes: 0
Favorites: 0
Off-Topic: 1

Visits by Source

User Actions

Users who voted for this posting

Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)