2009/9/13 Alex <xktybot@gmail.com>
How to use illegal names for MySQL with SQLObject?
In pure SQL it is possible to use backuotes, say:
SELECT `select from` FROM table1 WHERE 1;
...can be used to select the field called `select from`.
My situation is that I already have a DB which I'm trying to connect
with SQLObject to. MySQL throws an error because the table has illegal
names.
Is it possible to tell SQLObject to utilize backquotes?

Hi,
maybe you can just try to experiment with:
>>> class User(SQLObject):
...
... class sqlmeta:
... # user is a reserved word in some databases, so we won't
... # use that for the table name:
... table = "user_table"
...

(taken from http://www.sqlobject.org/SQLObject.html )

and with dbName

class Cenktgm01(SQLObject):
    class sqlmeta:       
        idType = str
        idName = 'OID$CENKTGM01'   
    nazev = UnicodeCol(dbName="nazev", dbEncoding = "1250")
    skupina = StringCol(length = 30)

You can also switch:
_connection.debug = True

You will see the SQL output. I have found it very useful.

HTH

Petr