Sybase (with Asp.net) temp table cannot be dropped
Posted on 2006-05-01
I am using Sybase and Asp.net.
I wish to create a temp table #Temp in a stored procedure. The columns of this temp table will be dynamically created. I will either use "create table" statement or I will use "select Col1, Col2.. into #Temp from .." Then I will use a select statement to output the resultset.
I can create the table, but I can't seem able to drop it and recreate it.
I created it first time and then the second time it fails. The error says it fails to find a column belonged to the first-time run. Or it just gives me the result of the first time. I even put "Drop table statement " in the beginning of my stored procedure..
What could be the reason? Is it possible that the logon I am using to connect does not have right to drop a temp table?