From: Edward Macnaghten <eddy@edlsystems.com>
To: William Shatner <shatner.william@gmail.com>
Cc: pgsql-novice@postgresql.org
Cc: pgsql-general@postgresql.org
Cc: pgsql-jdbc@postgresql.org
Subject: Re: MS Access to PostgreSQL
Date: Sun, 20 Mar 2005 00:21:00 +0000
Message-ID: <423CC1EC.5050400@edlsystems.com> (raw)
In-Reply-To: <9af1b1990503110919553a66ec@mail.gmail.com>
References: <9af1b1990503110919553a66ec@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: eddy@edlsystems.com, shatner.william@gmail.com, pgsql-novice@postgresql.org, pgsql-general@postgresql.org
Subject: Re: MS Access to PostgreSQL
In-Reply-To: <423CC1EC.5050400@edlsystems.com>
References: <9af1b1990503110919553a66ec@mail.gmail.com> <423CC1EC.5050400@edlsystems.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox