[web2py:35761] Re: DAL: decoding/encoding problem when talking to legacy DBs that are not utf-8 encoded

2009-11-21 Thread Hans Murx
tf-8').encode(db_codec) Hans ~ On 21 Nov., 16:37, mdipierro wrote: > Currently you cannot. Support for legacy databases is not on the same > foot as support for databases created by web2py. In particular as you > point out the encoding is an issue. > > One way around

[web2py:35758] Re: IS_NOT_IN_DB validator raises exception with legacy tables and does not work with informix://

2009-11-21 Thread Hans Murx
acy databases > opens issues like this. If we assume less about the table structure > then more checks are required which may result in more complex and > slower code. Let's all think about a good and elegant way to add > IS_NOT_IN_DB support for legacy databases. > &

[web2py:35742] DAL: decoding/encoding problem when talking to legacy DBs that are not utf-8 encoded

2009-11-21 Thread Hans Murx
example: In [1]: db = DAL('informix://oli:x...@suse101/stammdat') In [2]: db.define_table("personen", ...: Field("name", length=80), ...: Field("anz", "integer"), ...: primarykey=["name"], ...: migrate=False ...: ) In [3]: a = db().select(db.personen.name)[0].name I

[web2py:35736] IS_NOT_IN_DB validator raises exception with legacy tables and does not work with informix://

2009-11-21 Thread Hans Murx
gluon/validators.py lines 403-405: rows = self.dbset(field == value).select(limitby=(0, 1)) if len(rows) > 0 and str(rows[0].id) != str(self.record_id): return (value, self.error_message) - line 404: a field with name 'id' is required, but legacy tables may not have a

[web2py:35622] Re: DAL: inconsistent behavior with constraint violation errors

2009-11-19 Thread Hans Murx
151_174) violated. 100: ISAM error: duplicate value for a record with unique key. Regards, Hans ~ On 19 Nov., 14:50, mdipierro wrote: > I agree this is strange but this seems a database problem to me. > > On Nov 19, 6:49 am, Hans Murx wrote: > >

[web2py:35613] DAL: inconsistent behavior with constraint violation errors

2009-11-19 Thread Hans Murx
Hi, given this legacy informix table: ~~~ create table kperson ( name varchar(80, 1) not NULL, age integer not NULL, primary key (name) ); I did: >>> db.define_table("kperson", ... Field("name"), ... Field("age"), ... primarykey=["name"], ... mig

[web2py:35547] DAL/sql.py: patch for informix limitby

2009-11-18 Thread Hans Murx
Hi, afaik informix supports limiting resultsets with keword 'FIRST' since version 9.0 and skipping (=offset) with keyword 'SKIP' since version 10.0. The web2py default implementation 'LIMIT x OFFSET y' does not work with informix! The following patch to sql.py would implement informix's behavior

[web2py:34789] Re: Better support for legacy databases

2009-11-07 Thread Hans Murx
database support is only available for MS SQL, > DB2 and IngresDB so far. > But if you are willing to help by running tests and contributing your > knowledge on informix we can add support for it too. > > Denes. > > On 7 nov, 03:43, Hans Murx wrote: > > > History

[web2py:34785] Re: Join web2py wave

2009-11-07 Thread Hans Murx
1 would be nice! On 7 Nov., 08:44, Nicolás de la Torre wrote: > i have sent invites to: > > vinc...@vincentdavis.com > thade...@thadeusb.com > szims...@gmail.com > boris.manojlo...@gmail.com > richard_gor...@verizon.net > chris.st...@gmail.com > m.grit...@gmail.com > lapcc...@gmail.com > obutov.

[web2py:34779] Better support for legacy databases

2009-11-07 Thread Hans Murx
History of changes (http://web2py.com/examples/default/changelog) says: > 1.69.1 [...] > Better support for legacy databases (thank Denes) Unfortunately I have not been able to find more information about this issue. :-( Desperately waiting for support of informix non "id" / non integer primar

[web2py:34781] DAL: inserting rows that can't be selected

2009-11-07 Thread Hans Murx
Did that: >>> db = DAL("sqlite://db.db") >>> db.define_table("t1", Field("f1", "date")) >>> db.t1.insert(f1="a") 1 >>> db.t1[1].f1 Traceback (most recent call last): File "", line 1, in File "gluon/sql.py", line 1468, in __getitem__ File "gluon/sql.py", line 2883, in select File "gluon/