>
> Then you have to generate an ID and pass it to SQLObject:
>
> myTable = Cenktgm01(id=ID)
>
>
Yeah, this works, thanks
Petr
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's ex
On Thu, May 08, 2008 at 04:02:45PM +0200, Petr Jake?? wrote:
> There is not a sequence generator for this table in the database. All
> records IDs are generated by the application code.
Then you have to generate an ID and pass it to SQLObject:
myTable = Cenktgm01(id=ID)
Oleg.
--
Oleg Br
>
> Line 98, in _queryInsertID: it tried to execute
>
>c.execute('SELECT gen_id(%s,1) FROM rdb$database'
>% sequenceName)
>
> where
>
>sequenceName = soInstance.sqlmeta.idSequence or \
> 'GEN_%s' % table
>
> What
On Thu, May 08, 2008 at 03:33:51PM +0200, Petr Jake?? wrote:
> File
> "C:\Python25\lib\site-packages\sqlobject-0.10dev_r3187-py2.5.egg\sqlobject\firebird\firebirdconnection.py",
> line 98, in _queryInsertID
> % sequenceName)
> kinterbasdb.ProgrammingError: (-104, 'isc_dsql_prepare: \n invali
>
> No idea what it is. At what time and place SQLObject raises this?
The code looks like:
class Cenktgm01(SQLObject):
_connection = connection
nazev = StringCol(dbName="nazev")
myTable = Cenktgm01()
and the traceback is:
C:\automat>python pokusy.py
Traceback (most recent call last):
On Thu, May 08, 2008 at 03:02:17PM +0200, Petr Jake?? wrote:
> kinterbasdb.ProgrammingError: (-104, 'isc_dsql_prepare: \n invalid request
> BLR at offset 73\n generator GEN_CENKTGM01 is not defined')
No idea what it is. At what time and place SQLObject raises this?
Oleg.
--
Oleg Broytm
>
> Just declare columns you need and don't use fromDatabase:
>
> class MyTable(SQLObject):
> name = StringCol(dbName="a$name")
> value = IntCol(dbName="the$value")
>
>
Yes, I remember I was trying such a syntax at the begening but SQLObject was
complaining about ID generator and I was not ab
On Thu, May 08, 2008 at 02:05:20PM +0200, Petr Jake?? wrote:
> The table I would like to connect to has about 130 columns. I would like to
> read/write data from/to some columns only. Is there a way not to name all
> 130 columns in the table definition (in the class definition)? I mean is
> there a
>
>
>Then, it seems, there is no way to make this work with fromDatabase.
> BTW, SQL-92 doesn't allow '$' in identifiers - it only allows letters,
> digits and underscore (though most databases extend the rule and allow '$'
> anyway).
:-(
The table I would like to connect to has about 130 c
On Thu, May 08, 2008 at 12:56:09PM +0200, Petr Jake?? wrote:
> on the Win machine still the same error message:
> File
> "C:\Python25\lib\site-packages\sqlobject-0.10dev_r3187-py2.5.egg\sqlobject\main.py",
> line 369, in addColumn
> setter = eval('lambda self, val: self._SO_setValue(%s, val,
>
>
>You can use both at the same time:
>
> class MyTable(SQLObject):
> clas sqlmeta:
> fromDatabase=True
> name = StringCol(dbName="a$col")
>
> I.e. draw the columns' descriptions from the database but override some
> of them.
>
> I was trying above mentioned
on the Win machine
On Thu, May 08, 2008 at 11:17:30AM +0200, Petr Jake?? wrote:
> Thanks Oleg, I was reading about this feature of SQLObject. But my feeling
> was it is necessary to
> type all column names manually if the
> class sqlmeta:
>fromDatabase = True
> is not used.
> To be more specific, I mean it is
>
> > > Yes, there are column names like OID$CENKTGM01, MJ$TYP, AU$VYNOSY,
> > > AU$VYNOSY, AU$ZASOBY etc. in the table.
> > > The designer of the database is saying such a names are alowed
> according to
> > > the ANSI-92 SQL.
> >
> >SQLObject currently allows only columns that are proper Pyth
On Thu, May 08, 2008 at 01:04:32PM +0400, Oleg Broytmann wrote:
> On Thu, May 08, 2008 at 10:55:14AM +0200, Petr Jake?? wrote:
> > Yes, there are column names like OID$CENKTGM01, MJ$TYP, AU$VYNOSY,
> > AU$VYNOSY, AU$ZASOBY etc. in the table.
> > The designer of the database is saying such a names a
On Thu, May 08, 2008 at 10:55:14AM +0200, Petr Jake?? wrote:
> Yes, there are column names like OID$CENKTGM01, MJ$TYP, AU$VYNOSY,
> AU$VYNOSY, AU$ZASOBY etc. in the table.
> The designer of the database is saying such a names are alowed according to
> the ANSI-92 SQL.
SQLObject currently allows
On Wed, May 7, 2008 at 1:55 PM, Simon Cross <[EMAIL PROTECTED]> wrote:
> On Wed, May 7, 2008 at 12:15 PM, Petr Jakeš <[EMAIL PROTECTED]> wrote:
> > Hi, trying to connect to the existing Firebird database from the Windows
> XP
> > machine, I am getting following strange Error:
>
> >
> "C:\Python25\
On Wed, May 7, 2008 at 12:15 PM, Petr Jakeš <[EMAIL PROTECTED]> wrote:
> Hi, trying to connect to the existing Firebird database from the Windows XP
> machine, I am getting following strange Error:
> "C:\Python25\lib\site-packages\sqlobject-0.10dev_r3187-py2.5.egg\sqlobject\main.py",
> line 369, i
17 matches
Mail list logo