Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schema information of a temp table

Status
Not open for further replies.

varshan09

Programmer
Oct 28, 2003
45
0
0
IN
Hi All,
We are using ExecuteReader method of the SQlCommand object with the option of CommandBehavior.SchemaOnly. It works perfectly fine to get the schema of the columns in the resultset.

I am facing problem in fetching schema information of the temp tables(Created using #temp syntax). It gives error message that "incorrect syntax near #temp".

Can anybody throw light on this particular error?

Thanks
Varsha
 
Im assuming you're talking about SQL Cursors here, and you might be best advised to check this out in the SQL forum for clarification.

My view on this is that #temp syntax type tables are only for internal use in T-Sql commands, and that if you want the schema or the data back, is that you must use this temporary data, and use it to populate a strongly typed table which is then returned from your stored procedure.



Sweep
...if it works dont mess with it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top