November 30, 2004 at 4:34 pm
I have been using openquery quite regularly to get information from multiple DB2 databases and I consistently have frustration with finding things. I don't have direct access to the AS/400, only an ODBC connection.
Can anyone tell me what the equivalent of sysobjects and syscolumns is on the DB2 Database?
December 1, 2004 at 5:58 am
Perhaps you might be better off posting this to http://www.dbforums.com/f8 or
http://www.idug.org/ (I think they also host a mailing list)
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 2, 2004 at 7:39 am
The base table names are sysibm.systables and sysibm.syscolumns, but IBM recommends you use the catalog views - syscat.tables and syscat.columns.
December 2, 2004 at 8:51 am
You could also use ADO to get at this information...
Set rsobject = connectionobject.OpenSchema (QueryType, Criteria, SchemaID)
The OpenSchema method returns a read-only RecordSet object that contains schema (which means self-descriptive) information about the data source. For example, schema information can include the names of the tables, the names of the columns in the tables, and the data type of each column.
See the following site for a good explanation:
http://www.devguru.com/Technologies/ado/quickref/connection_openschema.html
December 2, 2004 at 9:03 am
Thanks! I knew it had to be there somewhere.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply