I am quite certain that the "select name from sys.tables" query will NOT work on versions of MSSS prior to 2005. For those we have to use the INFORMATION_SCHEMA views. Here are a couple of sources I found helpful:
"SQL Server 2005 introduces more than 250 new catalog views, some dealing with the database user and schema objects, which replace SQL Server 2000 system tables. We strongly recommend that you use the new catalog views to access metadata." http://technet.microsoft.com/en-us/library/ms190387.aspx "An information schema view is one of several methods SQL Server 2005 provides for obtaining metadata. Important: Some changes have been made to the information schema views that break backward compatibility. These changes are described in the topics for the specific views." http://technet.microsoft.com/en-us/library/ms186778.aspx The last ref made we wonder whether or not the same INFORMATION_SCHEMA queries would also work on MSSS 2k. I can install MSDE (SS 2k compatible) for testing, but I won't have time to do that for a couple of days. johnf wrote: > > On Tuesday 08 April 2008 09:22:44 pm johnf wrote: >> ## cursor.execute("select COLUMN_NAME, DATA_TYPE" >> ## " from %s.INFORMATION_SCHEMA.COLUMNS" >> ## " where table_catalog = '%s'" >> ## " and table_name = '%s'" >> ## " order by ORDINAL_POSITION" % >> (dbName,dbName,tableName)) > > Sorry I missed the quotes the above works. > > -- > John Fabiani [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]
