Re: MS Access to PostgreSQL

From: Edward Macnaghten <eddy(at)edlsystems(dot)com>
To: William Shatner <shatner(dot)william(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: MS Access to PostgreSQL
Date: 2005-03-20 00:21:00
Message-ID: 423CC1EC.5050400@edlsystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc pgsql-novice

William Shatner wrote:
> I have recently migrated from MS Access to PostgreSQL.Previously I had
> a SQL command
>
> ResultSet aGroupResultSet = aGroupPathStmt.executeQuery(
> "SELECT \"groupID\",\"fullpath\" FROM \"groups\" WHERE
> \"fullpath\" Like '" +
> aPath + "'");
>
>
>
> where aPath was equal to 'folder\another folder\%'.
>

<snip>

Are you sure? In MS-Access JET engine it uses the '*' character instead
of the '%' one as a "like" wildcard.

Two things you can try... If you have attached the table "groups" in
MS-Access and are using it through JET (as the code you provided would
suggest) then try changing the "%" character to "*" - the JET engine
will convert that to % for you, whereas it may escape the "%" character
you have supplied to keep the behaviour the same as JET.

The other possibility is to use the "dbPassThrough" parameter and
execute it as a pass through query, here the SQL is sent to the
PostgreSQL engine unchanged.

All in all I am sure this is an MS-Access problem rather than a Postgres
one.

Eddy

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2005-03-20 04:35:49 Re: Encoding-related errors when moving from 7.3 to 8.0.1
Previous Message Marco Colombo 2005-03-19 23:34:04 Re: plpython function problem workaround

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2005-03-20 22:39:46 Re: [Patch] JDBC3 Blob support
Previous Message Oliver Jowett 2005-03-17 20:37:41 Re: invalid string enlargement request

Browse pgsql-novice by date

  From Date Subject
Next Message Zouari Fourat 2005-03-20 04:17:03 where's the gap in the sequence ?
Previous Message uday kumar 2005-03-19 12:50:47 error http status 404: unable to locate resource