How to open table without having it get all data

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 17
Joined: Fri 14 Dec 2007 22:07

How to open table without having it get all data

Post by bernr » Mon 21 Apr 2008 16:20

I am converting an application over from DBISAM to SDAC that uses quite a few tables to save data to the database. In DBISAM it was quick as when it opens the table it DOES NOT pull in all the data but in SDAC it is very slow as when you open a table it does a select * from TABLENAME. So I would like to know how to open a table with out it grabbing any rows so we can do an insert on it.


Posts: 296
Joined: Thu 12 Oct 2006 09:34

Post by Ludek » Wed 23 Apr 2008 07:25

just set fetchall property to false.
Or, if you really only want to insert data, write the insert command into sql property and execute the query, you will the the query opening.
Or, write your query like 'select * from table where 1 = 0', you'll get only the structure without any data.

Post Reply