Sign in Join

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

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

ado-connection-pool-for-delphi

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

You can use this unit like this.

pascal
uses ConnectionPoolUnit;
pascal
var
  oQuery: TADOQuery;
begin
  oQuery := TADOQuery.Create(nil);
  try
    if oQuery.Active then
      oQuery.Close;
pascal
oQuery.Connection := ConnectionPool.GetConnection.Connection;
oQuery.SQL.Text := 'select * from Items  where ID = '+ IntToStr(iID);
pascal
oQuery.Open;
pascal
Result := oQuery.RecordCount;
pascal
finally
  oQuery.Free;
end;
pascal
end;