Re: [GENERAL] MS Access to PostgreSQL

Поиск
Список
Период
Сортировка
От Edward Macnaghten
Тема Re: [GENERAL] MS Access to PostgreSQL
Дата
Msg-id 423CC1EC.5050400@edlsystems.com
обсуждение исходный текст
Ответ на MS Access to PostgreSQL  (William Shatner <shatner.william@gmail.com>)
Ответы Re: [GENERAL] MS Access to PostgreSQL  (William Shatner <shatner.william@gmail.com>)
Список pgsql-jdbc
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



В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: invalid string enlargement request
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: [Patch] JDBC3 Blob support