On Tuesday 10 February 2009 04:07:55 pm Ricardo Aráoz wrote:
> SQL: select table_name from INFORMATION_SCHEMA.TABLES where
> table_catalog = %(db
> )s and table_type = 'BASE TABLE' order by table_name
I think the error should include the expanded version of the statement? It
looks like 'db' is not expanded to the database name.
Please tell me what version of MsSQL you are using.
Please copy your connection file code into your reply.
Try placing a print statement in the method to determine if you are getting
the database.
def getTables(self, cursor, includeSystemTables=False):
# jfcs 11/01/06 assumed public schema
# cfk: this worries me: how does it know what db is being used?
# tempCursor.execute("select name from sysobjects where xtype =
'U' order by
name")
dbName = self.database
## add the line below
print dbName
cursor.execute("select table_name"
" from INFORMATION_SCHEMA.TABLES"
" where table_catalog = %(db)s"
" and table_type = 'BASE TABLE'"
" order by table_name",
{'db':dbName} )
rs = cursor.getDataSet()
tables = [x["table_name"] for x in rs]
tables = tuple(tables)
return tables
--
John Fabiani
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]