Thank you Hans,
asap.

Massimo



On Nov 18, 12:38 pm, Hans Murx <[email protected]> wrote:
> 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
> depending on dbms-version:
>
> suse101:~/web2py-1436/gluon # diff sql.py.ori sql.py
> 2906a2907,2915
>
> >             elif self._db._dbname == 'informix':
> >                 fetch_amt = lmax - lmin
> >                 dbms_version = 
> > int(self._db._connection.dbms_version.split('.')[0])
> >                 if lmin and (dbms_version >= 10):
> >                     # Requires Informix 10.0+
> >                     sql_s += ' SKIP %d' % (lmin, )
> >                 if fetch_amt and (dbms_version >= 9):
> >                     # Requires Informix 9.0+
> >                     sql_s += ' FIRST %d ' % (fetch_amt, )
>
> Massimo, can you apply this patch?
>
> Regards,
>
>   Hans
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to