From: | Andrew Ayers <aayers(at)eldocomp(dot)com> |
---|---|
To: | "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Re: [bayes] access and postgresql |
Date: | 2003-12-04 16:40:40 |
Message-ID: | 3FCF6388.8080009@eldocomp.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Sezmillenium wrote:
> Hi all,
> I read your article "Using Microsoft Access with PostgreSQL" in
> http://techdocs.postgresql.org/v2/Guides/Using%20Microsoft%20Access%20with%20PostgreSQL/
> <http://techdocs.postgresql.org/v2/Guides/Using Microsoft Access with
> PostgreSQL/> .
>
> I am interested to convert access database to postgresql and I must
> use access to front view because I have a visual basic application. I
> tryed few months ago and I have a problem with seek function. You can
> see the code below:
>
> Set maquina = bd.OpenRecordset("maquina")
> maquina.index = "primarykey"
> maquina.Seek "=", OF
>
> With ODBC connection don't accept seek, because is a function that
> only works with access (is Jet connector). I didn't find a solution
> because I cannot change all code. Do you know something???
What you likely have is a VBA for Access application (not a straight VB
application). There is a subtle difference, but it is there. Anyhow, if
VBA is anything like VB, then something akin to:
Set maquina = bd.OpenRecordset("SELECT * FROM maquina WHERE _
primarykey = '" & OF & "'")
Note that I am using the convention in VB of the underscore for line
continuation.
Anyhow, this is likely something like you want (this makes a big
assumption that the VBA OpenRecordset function operates in the same
manner as the VB OpenRecordset function, which it likely does. It also
leaves out some things which I am not going to repeat here, simply
because I have noted enough of using VB with PostgreSQL and it is all in
the archives of the ODBC and GENERAL mailing lists).
Note, BTW, that if you want any semblance of speed, you will need to set
up that index on your table (ie, CREATE INDEX, referencing primarykey) -
you don't get indexes for "free" under PG like you do in Access - if you
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 whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email, and delete the message. Thank you.
From | Date | Subject | |
---|---|---|---|
Next Message | Philippe Lang | 2003-12-04 16:47:34 | Re: PLEASE: I really need german characters |
Previous Message | Gunnar Groetschel | 2003-12-04 16:24:08 | Re: PLEASE: I really need german characters |