If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Getting schema of temporary tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-02-10, 10:23
lucio lucio is offline
Registered User
 
Join Date: Dec 2010
Posts: 1
Question Getting schema of temporary tables

Hi,
I'd like to know if there is the possibility to obtain the schema of temporary tables via ODBC.
For standard tables, it's possible using the command
Code:
Conn.GetSchema ("Columns", {Nothing, Nothing, TableName})
Into SQLServer exists the same command for standard tables and the following trick for temporary tables:
Code:
Conn.CreateRecordSet ("DECLARE @table_name As VARCHAR(300)" &
     "SET @table_name = (SELECT TOP 1 [name] FROM tempdb..sysobjects" &
     "  WHERE name LIKE '#Foo%')" &
     "EXEC tempdb..sp_columns @table_name")
There is something like this into Informix too?

Thanks
Reply With Quote
Reply

Tags
getschema, schema, table, temp, temporary

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On