MSSQL does offer you 2 types of temporary tables and yes you can connect to
them with ADO no problem. You just have to understand how they work to be
able to use them properly.
The first type is a temp table that has a scope of the current session. It
is created using # as a prefix.
The second type is global in scope and can be accessed from different
sessions. It is created using ## as a prefix to the tablename.
So if you create a temp table eg. "CREATE #tmp (ID int)" from your delphi
app with 1 ADO connection which stays connected all the time you can do
anything with it, as if it was a normal table. As soon as you restart the
app or open and close the connection then it is gone!
If you create a global temp table using "CREATE ##tmp (ID int)" then you
will be able to connect to it from multiple sessions no worries, however it
will be dropped as soon as the session that created it ends.
excerpt from the sql help: "Global temporary tables are automatically
dropped when the session that created the table ends and all other tasks
have stopped referencing them. The association between a task and a table is
maintained only for the life of a single Transact-SQL statement. This means
that a global temporary table is dropped at the completion of the last
Transact-SQL statement that was actively referencing the table when the
creating session ended"
They do not reside on the clients local hard drive! The database server
manages them on the server, they are not designed to be a local copy of
existing tables!
Konrad.
"Hifni" <
XXXX@XXXXX.COM >wrote in message
Quote
Hi,
Uses: Delphi+5, MS SQL Server 2000 with TADO components on Windows XP
Professional 2002;
As I heard, SQL Server offers to create Virtual Tables or Temporary
Tables. My Question here is it possible to connect to TADO Dataset
Components? as it resides in Clients Local Hard Drive how can get
connected to TADO Datasets? Coz I want to use to TDataSet events to
process data.
Regards,
Hifni