CodeIgniter Forums
MS SQL and stored Procs - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: MS SQL and stored Procs (/showthread.php?tid=30965)

MS SQL and stored Procs - El Forum - 06-01-2010

I am calling a stored procedure from a Ms SQL database, but i am getting nothing returned.

Looking at the stored procedure, i can see that it gets all the required data, and puts it in a #Temp table. Then on the second last line it does a "select * from #temp".

The last line then does a "drop table #Temp".

How can i use php/codeigniter to get all the records/data from the "Select * from #Temp" query before the #Temp table is dropped?


MS SQL and stored Procs - El Forum - 06-02-2010

When using temp tables in MSSQL you don't need a drop table statement as the table scope is limited to the session in which it is created and will be automatically dropped when the session ends. Not sure if that will solve your problem or not but it's worth a shot.

MS SQL and stored Procs - El Forum - 06-14-2010

thanks for that.