private tables

  • Thread starter Thread starter Charlie
  • Start date Start date
C

Charlie

I use a stored procedure to create a temporary table using
CREATE TABLE #my_table. How do I acess these tables for
displaying forms and running queries against?
 
Be aware that #tables are thread sensitive, the stored
procedure has to run on the same thread for that table to
be active. The name should not change, you still refer it
as #my_table. If the table disapears then it is because
either the thread was closed, or you are not using the
same thread.

So you know, try using ##my_table instead, those tables
are stored in the tempdb as the #my_table but are
available to all threads until the system restart. I dont
know if this is what you want to do. but this should help
a bit.
 
Thanks for the info. I don't want to sound too
stupid...but what is a thread? If I use the tempdb will
each users have a unique copy of the table?
 
Back
Top