Welcome Guest, Not a member yet? Register   Sign In
MS SQL and stored Procs

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?


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.

thanks for that.

Theme © iAndrew 2016 - Forum software by © MyBB