By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,545 Members | 1,523 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,545 IT Pros & Developers. It's quick & easy.

Troubles with SQLDict

P: n/a
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
Jul 5 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.