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
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.
>
&
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
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
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:
>
>
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
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
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
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.
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
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/
11 matches
Mail list logo