Thread: access and postgresql

access and postgresql

From
"Sezmillenium"
Date:
Hi all,
    I read your article "Using Microsoft Access with PostgreSQL" in http://techdocs.postgresql.org/v2/Guides/Using%20Microsoft%20Access%20with%20PostgreSQL/ .
 
    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???
 
Thanks
SERGI

Re: access and postgresql

From
"nobody"
Date:
Could not you open the recordset with a specific WHERE condition in it?
:
db.OpenRecordset("SELECT * FROM maquina WHERE <your condition comes here>"

This way it would only pull the record(s) satysfying the WHERE condition.
Also, the SQL can be generated programatically before db.OpenRecordset().

""Sezmillenium"" <sezmillenium@yahoo.es> wrote in message
news:004901c3ba2a$66fb8be0$6937a8c0@cepex.com...
Hi all,
    I read your article "Using Microsoft Access with PostgreSQL" in
http://techdocs.postgresql.org/v2/Guides/Using%20Microsoft%20Access%20with%20PostgreSQL/ .

    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???

Thanks
SERGI