Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Temp Table in Sql Server
Message
From
14/11/2014 14:26:27
Walter Meester
HoogkarspelNetherlands
 
 
To
14/11/2014 11:55:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01610894
Message ID:
01611008
Views:
63
Yep, you've got it...



>Thank you Walter for the answer, Sergey for the KITN, and everybody else for your assistance.
>
>Apparantly, my testing wasn't as inclusive as it should have been - I focused on the data type more than the usage of parameters.
>
>If I understand correctly..........
>
>Using a ? parameter in the query causes SQL Server to execute a stored procedure. The SP runs in the equivalent of its
>own instance and, because I specified only #, the result set disappears when the SP ends. When I specify ##, the result
>set is visible to my VFP ODBC connection (and, I think, any other open instance of SQL Server) and disappears when
>all the instances that reference it are disconnected.
>
>Without using a ? parameter, the result set is created and, when # is used, it is visible only to the instance which created it.
>If ## is used, the same rules about open instances apply.
>
>Do I have this essentially correct?
>
>The implication is that I need to be careful about the temp table names when using ## because other users running the same
>code could create conflicts (Table Exists errors or overwriting the table or something like that) so I need to use SYS(2015)
>or some equivalent to create the temp table names.
>
>So far so good??????
>
>Any other tips (other than to really learn how to use the Profiler - thanks Walter) greatly appreciated.
>
>............Rich
Previous
Reply
Map
View

Click here to load this message in the networking platform