X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 61996D1B445 for ; Thu, 4 Dec 2003 16:41:30 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 72142-04 for ; Thu, 4 Dec 2003 12:40:59 -0400 (AST) Received: from ecintweb.eldocomp.com (smtp.eldocomp.com [205.159.99.8]) by svr1.postgresql.org (Postfix) with ESMTP id 5EA4BD1B436 for ; Thu, 4 Dec 2003 12:40:58 -0400 (AST) Received: by ecintweb.eldocomp.com with XWall v3.28 ; Thu, 4 Dec 2003 09:40:41 -0700 From: Andrew Ayers To: "pgsql-odbc@postgresql.org" Subject: Re: [bayes] access and postgresql Date: Thu, 4 Dec 2003 09:40:40 -0700 X-Assembled-By: XWall v3.28 Message-ID: <3FCF6388.8080009@eldocomp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/14 X-Sequence-Number: 3552 Sezmillenium wrote: > Hi all, > I read your article "Using Microsoft Access with PostgreSQL" in=20 > http://techdocs.postgresql.org/v2/Guides/Using%20Microsoft%20Access%20wit= h%20PostgreSQL/=20 > PostgreSQL/> . >=20=20 > I am interested to convert access database to postgresql and I must= =20 > use access to front view because I have a visual basic application. I=20 > tryed few months ago and I have a problem with seek function. You can=20 > see the code below: >=20=20 > Set maquina =3D bd.OpenRecordset("maquina") > maquina.index =3D "primarykey" > maquina.Seek "=3D", OF >=20=20 > With ODBC connection don't accept seek, because is a function that=20 > only works with access (is Jet connector). I didn't find a solution=20 > because I cannot change all code. Do you know something??? What you likely have is a VBA for Access application (not a straight VB=20 application). There is a subtle difference, but it is there. Anyhow, if=20 VBA is anything like VB, then something akin to: Set maquina =3D bd.OpenRecordset("SELECT * FROM maquina WHERE _ primarykey =3D '" & OF & "'") Note that I am using the convention in VB of the underscore for line=20 continuation. Anyhow, this is likely something like you want (this makes a big=20 assumption that the VBA OpenRecordset function operates in the same=20 manner as the VB OpenRecordset function, which it likely does. It also=20 leaves out some things which I am not going to repeat here, simply=20 because I have noted enough of using VB with PostgreSQL and it is all in=20 the archives of the ODBC and GENERAL mailing lists). Note, BTW, that if you want any semblance of speed, you will need to set=20 up that index on your table (ie, CREATE INDEX, referencing primarykey) -=20 you don't get indexes for "free" under PG like you do in Access - if you=20 have used Access for a while, you may have a lot to unlearn/relearn). Hopefully, this will get you started down the right road. Andrew L. Ayers -- CONFIDENTIALITY NOTICE -- This message is intended for the sole use of the individual and entity to w= hom it is addressed, and may contain information that is privileged, confid= ential and exempt from disclosure under applicable law. If you are not the = intended addressee, nor authorized to receive for the intended addressee, y= ou are hereby notified that you may not use, copy, disclose or distribute t= o anyone the message or any information contained in the message. If you ha= ve received this message in error, please immediately advise the sender by = reply email, and delete the message. Thank you.