Sybase Temporary Tables 
Author Message
 Sybase Temporary Tables

My form needs to create a Sybase temporary table on Form-Create and then
insert data into this table using a stored procedure (TStoreProc component)
when a particular button is pressed on the screen. I must then be able to
access this data whilst the form is active.

The problem I have is that everytime I execute a different TStoreProc
component, it has a different thread to the database, and the temporary
table is based on a thread.

I would be very grateful if anybody had any suggestions about how the above
could be done. Is there a free-hand component in delphi where one can do
INSERTS, UPDATES, CREATE TABLES etc ?

Thanks
Bronwen
--



Sat, 06 Nov 1999 03:00:00 GMT  
 Sybase Temporary Tables

Why are you not using TQuery?



Quote:

> I would be very grateful if anybody had any suggestions about how the
above
> could be done. Is there a free-hand component in Delphi where one can do
> INSERTS, UPDATES, CREATE TABLES etc ?

> Thanks
> Bronwen
> --




Sun, 07 Nov 1999 03:00:00 GMT  
 Sybase Temporary Tables


Quote:
>My form needs to create a Sybase temporary table on Form-Create and then
>insert data into this table using a stored procedure (TStoreProc component)
>when a particular button is pressed on the screen. I must then be able to
>access this data whilst the form is active.

>The problem I have is that everytime I execute a different TStoreProc
>component, it has a different thread to the database, and the temporary
>table is based on a thread.

>I would be very grateful if anybody had any suggestions about how the above
>could be done. Is there a free-hand component in Delphi where one can do
>INSERTS, UPDATES, CREATE TABLES etc ?

>Thanks
>Bronwen

 The TQuery component should allow you to pass through the SQL to create a
table, etc.  When you state that you need a temp table, are you really
referring to a Sybase temp table in tempdb?  You could also create a
persistent table that stores a sybase process id (spid) in a column so that
rows could be inserted, selected, and deleted using this spid.

Each time you create a new thread you would need to get the spid for that

the logic to manage entries in the table.

One caveat with the above would be locking.  I don't know what kind of use
such a table would be put to, so it is hard to know if you would have locking
problems.

--
Bob McClintock



Sun, 07 Nov 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Sybase, Delphi and temporary tables?

2. Help! Native language in Temporary tables

3. Temporary Tables / FOREACH

4. Help Requested: Temporary DataSets/Tables...

5. How to create temporary table for each user?

6. Add temporary index to a table

7. temporary table resource limit

8. Temporary Table in Delphi, like :PRIV:Answer.db in pdox

9. Temporary tables

10. Temporary files with Paradox tables

11. TQuery and temporary table (urgent)

12. Problem on closing a large SYBASE table

 

 
Powered by phpBB® Forum Software