Troubles with SQLDict
Rony Steelandt
bucodi at yahoo.fr
Wed Jul 5 08:17:40 EDT 2006
I would like to use SQLDict against a MS SQL server database, but got stuck
at the very beginning
import pymssql
import SQLDict
# Connect to database
c=pymssql.connect('192.168.1.13:dblisamaster:sa')
db = SQLDict.SQLDict(c)
class VAT(SQLDict.ObjectBuilder):
table = 'TBLVat'
columns = ['VATID','VATLabel']
update_columns = columns
indices = [('ID',['VATID'])]
VAT().register(db)
db.TBLVat.loc['1']
the last instruction gives me the error :
------------------------------------------------------------------
Traceback (most recent call last):
File "./bureau/test.py", line 19, in ?
db.TBLVat.loc['1']
File "C:\Python24\lib\SQLDict.py", line 155, in __getattr__
return getattr(self.db, attr)
AttributeError: pymssqlCnx instance has no attribute 'TBLVat'
------------------------------------------------------------------
This is allmost a copy of the instructions in the module, so I have no idea
what goes wrong.
Any ideas ?
tia
Rony Steelandt
More information about the Python-list
mailing list