X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9B7085368C for ; Thu, 24 Mar 2005 11:17:25 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72453-07 for ; Thu, 24 Mar 2005 11:17:21 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.203]) by svr1.postgresql.org (Postfix) with ESMTP id 9F3785364E for ; Thu, 24 Mar 2005 11:17:20 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 36so525562wra for ; Thu, 24 Mar 2005 03:17:23 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=ADA1wSFdYYQqlqyPQtiu8mw91MsFXKwxrwE7AUqw93gz2nGFHwWIXZ/x5SDuYhhlm81pJgLGyIhKTDlZgAFRffsT4opj9TdcAFJDg2ukHCm/KY56wHI0N2IyBsV1MAWfQCFRkWxJg/SPlEYbBYsuh9H1BK2MVug3Td+v6lJaJpQ= Received: by 10.54.94.8 with SMTP id r8mr79837wrb; Thu, 24 Mar 2005 03:17:23 -0800 (PST) Received: by 10.54.14.36 with HTTP; Thu, 24 Mar 2005 03:17:23 -0800 (PST) Message-ID: <9af1b199050324031764ba8419@mail.gmail.com> Date: Thu, 24 Mar 2005 11:17:23 +0000 From: William Shatner Reply-To: William Shatner To: Edward Macnaghten Subject: Re: MS Access to PostgreSQL Cc: pgsql-novice@postgresql.org, pgsql-general@postgresql.org, pgsql-jdbc@postgresql.org In-Reply-To: <423CC1EC.5050400@edlsystems.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <9af1b1990503110919553a66ec@mail.gmail.com> <423CC1EC.5050400@edlsystems.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.415 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200503/1180 X-Sequence-Number: 75495 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 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\%'. > > > > > > 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 > >