On Sunday 10 February 2008 11:16 am, Ed Leafe wrote:
> On Feb 10, 2008, at 1:13 PM, Adrian Klaver wrote:
> > Is there a way to do the equivalent of an Access pass through query?
> > The reason I ask is I tried the following:
> > pl_ds.execute("select * from dataset where common ilike 'agast%'")
>
> What is 'pl_ds'?
>
> > and got this error message:
> > OperationalError: near "ilike": syntax error
> > ilike is valid syntax for Postgres. I also get the same error for
> > distinct on(). I realize it would be a nightmare to accommodate all
> > the SQL dialects in the parser, so is possible to bypass the Dabo
> > parser on a case by case basis?
>
> You can easily do this in Dabo:
>
> crs = myBizobj.getTempCursor()
> crs.execute("select dialect-specific sql...")
>
> As long as the bizobj has a connection to Postgres, this temp cursor
> will accept Postgres-specific syntax.
>
> -- Ed Leafe
Here is the sequence of events leading up to the error and the full error
message.
pl_biz=self.getBizobj()
pl_ds=pl_biz.getDataSet()
pl_rs=pl_ds.execute("select * from dataset where common ilike 'agast%'")
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/home/aklaver/dabo_program/dabo/db/dDataSet.py", line 351, in execute
self._cursor.execute(sqlExpr, params)
OperationalError: near "ilike": syntax error
--
Adrian Klaver
[EMAIL PROTECTED]
_______________________________________________
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/dabo-users/[EMAIL PROTECTED]