On Saturday, March 26, 2011 10:18:42 am Jacek Kałucki wrote:
> Użytkownik Sibylle Koczian napisał:
> > As far as I can see at the moment it's the LIMIT clause added to the
> > SQL. Firebird uses SELECT FIRST x SKIP y<rest of query>  (or with new
> > versions SELECT<rest of query>  ROWS y+1 TO y+x) instead. If a Dabo
> > application uses a normal dBizobj this is no problem, the usual "LIMIT
> > 1000" addition is changed to "FIRST 1000" and this clause is put into
> > its correct place.
> > 
> > But the createreport script uses dConnection.getDaboCursor() and that
> > doesn't seem to do this adaptation. Using a Firebird connection it
> > crashes with exactly the same error message I get from FlameRobin if I
> > try to execute a query with "LIMIT x" directly.
> > 
> > I'll try to find out more about this, but perhaps somebody else has good
> > advice?
> 
> Hi.
> 
> You mean that cursor.setLimitClause("1000") doesn't work?
> 
> Regards
> Jacek Kałucki

No I think what he is saying is the code I provided (designed to work with 
Postgres) is causing a problem with FireBird because of the LIMIT statement 
I'm most likely added.

I guess there are several ways this can be handled.  

1. create an if elif statement handling the different ways the different 
databases require it.

2.  change the code to use .setLimitClause("1000") - I'm guessing that will be 
much harder.

3.  hard code it for what you are doing!

Johnf
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to