Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Victor,
Well, technically, a new session is created when a connection is opened. When a connection is closed, then that session ceases to exists and thus the temp tables with them. Now you could try a global temp table using the ## instead of the #, but you may run into the same issue and there is some danger of other users hitting the temp table. There are quit a few articles out on the web about this, but the one thing that I know and have proven time and time again is that if you close a connection, which a BO does after each data layer call, the temp tables will go with it.
The reason that you do not want to keep a connection open is actually very simple and easy to reproduce....performance! When you keep a connection open, you have a quick descent on performance as well as resources. So a I mentioned previously, you are better off creating a SPROC to handle this.
FYI, VFP handles temp tables and SQL passthroughs entirely differently than .NET (as does the Jet OLEDB provider if you are using Access).
|