Paul McNett wrote:
>>> DBQueryException: internal error: None
>>> SQL: select table_name from INFORMATION_SCHEMA.TABLES where table_catalog = 
>>> %(db)s and table_type = 'BASE TABLE' order by table_name
> 
> If you change dabo/db/dCursorMixin.py line 331 from 'raise 
> dException..." to simply "raise", and re-run appwizard, does the 
> traceback offer more information?

Yes; I get the following:
> Traceback (most recent call last):
>   File "AppWizard.py", line 305, in onLeavePage
>     tables = cursor.getTables()
>   File "C:\Dwig\tmp\dabo\dabo\db\dCursorMixin.py", line 1789, in getTables
>     return self.BackendObject.getTables(self.AuxCursor, includeSystemTables)
>   File "C:\Dwig\tmp\dabo\dabo\db\dbMsSQL.py", line 79, in getTables
>     {'db':dbName} )
>   File "C:\Dwig\tmp\dabo\dabo\db\dCursorMixin.py", line 313, in execute
>     res = self.superCursor.execute(self, sql, params)
>   File "c:\ProgramFiles\Python24\lib\site-packages\pymssql.py", line 126, in 
> execute
>     self.executemany(operation, (params,))
>   File "c:\ProgramFiles\Python24\lib\site-packages\pymssql.py", line 152, in 
> executemany
>     raise DatabaseError, "internal error: %s" % self.__source.errmsg()
> DatabaseError: internal error: None

I've probed a bit further, by printing the SQL statement and parameters; 
the statement was:
> select table_name from INFORMATION_SCHEMA.TABLES where table_catalog = %(db)s 
> and table_type = 'BASE TABLE' order by table_name

... and the parameters: {'db': u'Kearney__OnlineDev'}

I did a manual substitution, and executed the following in Query Analyzer:
> select table_name from INFORMATION_SCHEMA.TABLES where table_catalog = 
> 'Kearney__OnlineDev' and table_type = 'BASE TABLE' order by table_name

This worked with no problem.  Then, using pymssql in a Python shell, I 
was able to execute the manually substituted query successfully as well. 
  However, the following got the same internal error you see above:

> crsr.execute("select ....", params={'db': u'Kearney__OnlineDev'})

(Where I've elided the query for presentation.)

After playing around a bit, I got success by removing the "u" in front 
of the parameter; it seems that pymssql doesn't like Unicode strings in 
the parameters to cursor.execute().

So, for my immediate purpose, I went through dbMsSQL.py, appending 
".encode()" to all the parameters in the execute statements.  This done, 
I was able to complete AppWizard and get my app generated.

And now for something completely different: I've seen references to the 
"web update" feature, but I haven't found a description on how it works 
or how it's invoked.  Could you enlighten me?

Thanks,
-- 
Don Dwiggins
Advanced Publishing Technology



_______________________________________________
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]

Reply via email to