From: | William Shatner <shatner(dot)william(at)gmail(dot)com> |
---|---|
To: | Edward Macnaghten <eddy(at)edlsystems(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-24 11:17:23 |
Message-ID: | 9af1b199050324031764ba8419@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-jdbc pgsql-novice |
Hi Edward,
Michael Fuhr's solution worked (Mar 11). I had to write a method to
insert four backslashes into the the path been searched for. For
example if the stored path in the DB was folder1\folder2\folder3\ in
order for PostgreSQL to serach against this i had to search for path
LIKE folder1\\\\folder2\\\\folder3\\\\%.
Thanks to all for help and suggestions.
WS
On Sun, 20 Mar 2005 00:21:00 +0000, Edward Macnaghten
<eddy(at)edlsystems(dot)com> wrote:
> 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
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | postgresql | 2005-03-24 12:37:59 | Good Books |
Previous Message | Martijn van Oosterhout | 2005-03-24 10:15:45 | Re: multi line text data/query ?bug? |
From | Date | Subject | |
---|---|---|---|
Next Message | Vernon | 2005-03-24 19:04:47 | Unable to make a connention through jdbc |
Previous Message | Oliver Jowett | 2005-03-23 21:49:01 | Re: Stored proc returns RECORD & JDBC |
From | Date | Subject | |
---|---|---|---|
Next Message | Marc Ayres | 2005-03-24 16:17:52 | Windows 2000 Installation Issue |
Previous Message | Cima | 2005-03-24 05:31:57 | cleanup of template1 |