hi sorry for not repling before I'm not a firebird user but maybe you want to take a look at.
http://trac.turbogears.org/turbogears/ticket/83 if you could provide feedback on that ticket so we can finally resolve it, will be great On 10/2/06, RadOldMan <[EMAIL PROTECTED]> wrote: > > I have been trying to connect to a Firebird database on win2K and have > found 3 problems. > 1) Can't figure how to set type_conv=200, this is necessary if not > using mx_time, I can do this if I create connection at SQLObject level, > will attach code below I tried to add "?type_conv=200" to > sqlobject.dburi value but that fails with invalid arguments. > > 2) When I try to run "tg-admin sql create" I get : > File "C:\Python24\Lib\site-packages\kinterbasdb\__init__.py", line > 272, in ini > t > _k.concurrency_level_set(concurrency_level) > kinterbasdb.ProgrammingError: (0, 'The concurrency level cannot be > changed once > it has been set. Use kinterbasdb.init(concurrency_level=?) to set the > concurren > cy level legally.') > > > I will include entire traceback, also below. Some reseach indicated > that this error may be because of attempting to call init more than > once? > > ) Probably a SQLObject problem, but when I create a table within > SQLObject it includes the ID field and a generator to perform the > auto-increment process, but does not create a corresponding ON Insert > trigger. > > ========== Code that works ========== > Here is the code that works (with exception of on-insert trigger > problem) when run using SQLObject, note call to kinterbasdb.init, > without this it fails: > > import kinterbasdb > kinterbasdb.init(type_conv=200) > from sqlobject import * > cs = > "firebird://sysdba:[EMAIL PROTECTED]:3050/c|/tutorial/tutorial.fdb" > sqlhub.processConnection = connectionForURI(cs) > class Person(SQLObject): > fname = StringCol() > > Person.createTable() > > ============ Here is full traceback when I use the same connect string > in dev.cfg and run tg-admin sql create: ======= > > C:\tutorial>tg-admin sql create > Using database URI > firebird://sysdba:[EMAIL PROTECTED]:3050/c|/tutorial/tutori > al.fdb > Traceback (most recent call last): > File "c:\python24\scripts\tg-admin-script.py", line 7, in ? > sys.exit( > File > "c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\comm > and\base.py", line 356, in main > command.run() > File > "c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\comm > and\base.py", line 143, in run > command.the_runner.run(sys.argv) > File > "c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje > ct\manager\command.py", line 102, in run > runner.run() > File > "c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje > ct\manager\command.py", line 233, in run > self.command() > File > "c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje > ct\manager\command.py", line 556, in command > exists = soClass._connection.tableExists(soClass.sqlmeta.table) > File > "c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje > ct\firebird\firebirdconnection.py", line 146, in tableExists > result = self.queryOne("SELECT COUNT(rdb$relation_name) FROM > rdb$relations W > HERE rdb$relation_name = '%s'" > File > "c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje > ct\dbconnection.py", line 349, in queryOne > return self._runWithConnection(self._queryOne, s) > File > "c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje > ct\firebird\firebirdconnection.py", line 51, in _runWithConnection > conn = self.getConnection() > File > "c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje > ct\dbconnection.py", line 229, in getConnection > conn = self.makeConnection() > File > "c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje > ct\firebird\firebirdconnection.py", line 82, in makeConnection > charset=self.charset, > File "C:\Python24\Lib\site-packages\kinterbasdb\__init__.py", line > 435, in con > nect > return Connection(*args, **keywords_args) > File "C:\Python24\Lib\site-packages\kinterbasdb\__init__.py", line > 533, in __i > nit__ > _ensureInitialized() > File "C:\Python24\Lib\site-packages\kinterbasdb\__init__.py", line > 348, in _en > sureInitialized > init() > File "C:\Python24\Lib\site-packages\kinterbasdb\__init__.py", line > 272, in ini > t > _k.concurrency_level_set(concurrency_level) > kinterbasdb.ProgrammingError: (0, 'The concurrency level cannot be > changed once > it has been set. Use kinterbasdb.init(concurrency_level=?) to set the > concurren > cy level legally.') > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

