pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedaccess and postgresql
11+ messages / 9 participants
[nested] [flat]
* access and postgresql
@ 2003-12-04 05:49 Sezmillenium <sezmillenium@yahoo.es>
0 siblings, 1 reply; 11+ messages in thread
From: Sezmillenium @ 2003-12-04 05:49 UTC (permalink / raw)
To: pgsql-odbc
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
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [bayes] access and postgresql
@ 2003-12-04 16:40 Andrew Ayers <aayers@eldocomp.com>
0 siblings, 0 replies; 11+ messages in thread
From: Andrew Ayers @ 2003-12-04 16:40 UTC (permalink / raw)
To: 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.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: access and postgresql
@ 2003-12-05 17:59 nobody <nobody@nowhere.near.here>
parent: Sezmillenium <sezmillenium@yahoo.es>
0 siblings, 0 replies; 11+ messages in thread
From: nobody @ 2003-12-05 17:59 UTC (permalink / raw)
To: pgsql-odbc
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
^ permalink raw reply [nested|flat] 11+ messages in thread
* @#$%^& Access and PostgreSQL
@ 2004-06-14 23:50 Roderick A. Anderson <raanders@acm.org>
0 siblings, 2 replies; 11+ messages in thread
From: Roderick A. Anderson @ 2004-06-14 23:50 UTC (permalink / raw)
To: pgsql-odbc
I have spent two days now trying to get MS Access to play with PostgreSQL.
Searched the archives of this list and Google'd myself crazy but either
I'm the only one having problems with this :-) or I haven't figured out
the right keywords to search.
Short story. Pg 7.2 running on a Linux box. MS Access 2000 on WinXP Pro.
I can query and fiddle with the data in Access but I haven't figured out
how to get the changes back into Pg.
There is nothing worth a darn in the Access help and working my way
through the menus has got me no success.
Quick; please someone hit me with a cluestick! Or if it's too far to
reach is there a tutorial on using MS Access and Pg together?
Oh yeah, I looked at pgAccess but the site is down and the registrar
indicates it is being deleted. PgAdmin II (since I'm using Pg 7.2) is ...
OK, but too slow for editing by the folks I work with.
TIA,
Rod
--
"Open Source Software - You usually get more than you pay for..."
"Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: @#$%^& Access and PostgreSQL
@ 2004-06-15 01:23 Joe Conway <mail@joeconway.com>
parent: Roderick A. Anderson <raanders@acm.org>
1 sibling, 2 replies; 11+ messages in thread
From: Joe Conway @ 2004-06-15 01:23 UTC (permalink / raw)
To: Roderick A. Anderson <raanders@acm.org>; +Cc: pgsql-odbc
Roderick A. Anderson wrote:
> Short story. Pg 7.2 running on a Linux box. MS Access 2000 on WinXP Pro.
> I can query and fiddle with the data in Access but I haven't figured out
> how to get the changes back into Pg.
>
> Quick; please someone hit me with a cluestick! Or if it's too far to
> reach is there a tutorial on using MS Access and Pg together?
It's been a long time since I've messed with MSAccess/pgsql, but IIRC,
you need to be sure your table has a primary key defined to get a
writeable recordset. Also, make sure the linked table on the Access side
reflects that.
HTH,
Joe
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: [Maybe Spam] @#$%^& Access and PostgreSQL
@ 2004-06-15 13:30 Greg Campbell <greg.campbell@us.michelin.com>
parent: Roderick A. Anderson <raanders@acm.org>
1 sibling, 0 replies; 11+ messages in thread
From: Greg Campbell @ 2004-06-15 13:30 UTC (permalink / raw)
To: Roderick A. Anderson <raanders@acm.org>; +Cc: pgsql-odbc
can't get changes back into pg.
That is not a lot to go on. We don't know if your are using a simple
action query, a bound form, or VBA code. You might supply some detail
about what you've done and what failed.
Remember - with MS Access and PostgreSQL you are in a client-server
situation. One in which PostgreSQL doesn't really do attached
recordsets. Think read is one step, write is another step, being linked
is an illusion.
With that in mind, you may want to try a simple append query. (You might
want to do a make table query to get the schema right and use that table
to populate what you want to append).
OBDC will simulate an attached recordset (the illusion bound table part)
if your source has a primary key, and better yet OIDs. This will help in
the case of bound forms.
On the PostgreSQL server side you may want to see if postgreSQL is
logging on startup (the pg_ctl -l filename) option. Look for errors.
On the ODBC side you may want to turn on logging and trace the
communication flow (the logs get pretty big pretty quick).
Good Luck
Roderick A. Anderson wrote:
>I have spent two days now trying to get MS Access to play with PostgreSQL.
>Searched the archives of this list and Google'd myself crazy but either
>I'm the only one having problems with this :-) or I haven't figured out
>the right keywords to search.
>
>Short story. Pg 7.2 running on a Linux box. MS Access 2000 on WinXP Pro.
>I can query and fiddle with the data in Access but I haven't figured out
>how to get the changes back into Pg.
>
>There is nothing worth a darn in the Access help and working my way
>through the menus has got me no success.
>
>Quick; please someone hit me with a cluestick! Or if it's too far to
>reach is there a tutorial on using MS Access and Pg together?
>
>Oh yeah, I looked at pgAccess but the site is down and the registrar
>indicates it is being deleted. PgAdmin II (since I'm using Pg 7.2) is ...
>OK, but too slow for editing by the folks I work with.
>
>
>TIA,
>Rod
>
>
Attachments:
greg.campbell.vcf (text/x-vcard, 281B) download
begin:vcard
fn:Greg Campbell
n:Campbell;Greg
org:Michelin North America;ENG-IT
adr;dom:;;2420 Two Notch Road;Lexington;SC;29071
email;internet:greg.campbell@us.michelin.com
title:Systems Engineer
tel;work:803-951-5561
tel;fax:803-951-5531
x-mozilla-html:FALSE
version:2.1
end:vcard
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: @#$%^& Access and PostgreSQL
@ 2004-06-15 14:59 Philippe Lang <philippe.lang@attiksystem.ch>
0 siblings, 1 reply; 11+ messages in thread
From: Philippe Lang @ 2004-06-15 14:59 UTC (permalink / raw)
To: Roderick A. Anderson <raanders@acm.org>; pgsql-odbc
Hello,
Firstly, beleive me, Access linked to Postgresql through ODBC works really well. The driver works fine, I'm using it every day, several clients too.
How do you "query and fiddle with the data in Access"? You have to use a ***linked ODBC table***, and in this case, updates are transparent. You simply modify the data, and the updates are generated for you. Is that what you are trying to do?
Philippe
-----Message d'origine-----
De : pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org] De la part de Roderick A. Anderson
Envoyé : mardi, 15. juin 2004 01:50
À : pgsql-odbc@postgresql.org
Objet : [ODBC] @#$%^& Access and PostgreSQL
I have spent two days now trying to get MS Access to play with PostgreSQL.
Searched the archives of this list and Google'd myself crazy but either I'm the only one having problems with this :-) or I haven't figured out the right keywords to search.
Short story. Pg 7.2 running on a Linux box. MS Access 2000 on WinXP Pro.
I can query and fiddle with the data in Access but I haven't figured out how to get the changes back into Pg.
There is nothing worth a darn in the Access help and working my way through the menus has got me no success.
Quick; please someone hit me with a cluestick! Or if it's too far to reach is there a tutorial on using MS Access and Pg together?
Oh yeah, I looked at pgAccess but the site is down and the registrar indicates it is being deleted. PgAdmin II (since I'm using Pg 7.2) is ...
OK, but too slow for editing by the folks I work with.
TIA,
Rod
--
"Open Source Software - You usually get more than you pay for..."
"Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: @#$%^& Access and PostgreSQL
@ 2004-06-15 15:16 Jeff Eckermann <jeff_eckermann@yahoo.com>
parent: Joe Conway <mail@joeconway.com>
1 sibling, 0 replies; 11+ messages in thread
From: Jeff Eckermann @ 2004-06-15 15:16 UTC (permalink / raw)
To: Roderick A. Anderson <raanders@acm.org>; +Cc: pgsql-odbc
--- Joe Conway <mail@joeconway.com> wrote:
> Roderick A. Anderson wrote:
> > Short story. Pg 7.2 running on a Linux box. MS
> Access 2000 on WinXP Pro.
> > I can query and fiddle with the data in Access but
> I haven't figured out
> > how to get the changes back into Pg.
>
> >
> > Quick; please someone hit me with a cluestick! Or
> if it's too far to
> > reach is there a tutorial on using MS Access and
> Pg together?
>
> It's been a long time since I've messed with
> MSAccess/pgsql, but IIRC,
> you need to be sure your table has a primary key
> defined to get a
> writeable recordset. Also, make sure the linked
> table on the Access side
> reflects that.
Good points: always refresh (or relink) your linked
tables after making changes to tables on the server
side; also, I find life becomes much easier with
Access when I use a serial primary key on every table
as a matter of course.
Have you created your tables without oid's? I believe
that could cause you a problem, because the ODBC
driver expects oid's in some circumstances. In any
case, I suggest you set the "row versioning" driver
setting to true.
The suggestion elsewhere to turn on logging, on both
client and server sides, is a good one.
>
> HTH,
>
> Joe
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please
> send an appropriate
> subscribe-nomail command to
> majordomo@postgresql.org so that your
> message can get through to the mailing list
> cleanly
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: @#$%^& Access and PostgreSQL
@ 2004-06-15 17:31 Roderick A. Anderson <raanders@acm.org>
parent: Philippe Lang <philippe.lang@attiksystem.ch>
0 siblings, 0 replies; 11+ messages in thread
From: Roderick A. Anderson @ 2004-06-15 17:31 UTC (permalink / raw)
To: Philippe Lang <philippe.lang@attiksystem.ch>; +Cc: pgsql-odbc
On Tue, 15 Jun 2004, Philippe Lang wrote:
> Hello,
>
> Firstly, beleive me, Access linked to Postgresql through ODBC works
> really well. The driver works fine, I'm using it every day, several
> clients too.
Used to be for me also a year or three ago. This new go-round (I spent
three plus years not having to deal with MS Access) it has been anything
but smooth. The few times before it was a slam dunk.
> How do you "query and fiddle with the data in Access"? You have to use
> a ***linked ODBC table***, and in this case, updates are transparent.
> You simply modify the data, and the updates are generated for you. Is
> that what you are trying to do?
Philippe, this is the term I was missing. 'Linked' ODBC tables. For some
reason when I created the Access portion last week there was no ODBC data
sources for linked tables ... I think. Probably had something else in
mind when I tried using this option. No there wasn't. It's working now.
Thanks to all for suggestions and a couple of clue-sticks.
Rod
--
"Open Source Software - You usually get more than you pay for..."
"Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: @#$%^& Access and PostgreSQL
@ 2004-06-17 17:22 Michael Calabrese <m2calabr@yahoo.com>
parent: Joe Conway <mail@joeconway.com>
1 sibling, 1 reply; 11+ messages in thread
From: Michael Calabrese @ 2004-06-17 17:22 UTC (permalink / raw)
To: pgsql-odbc
Are you getting any error messages. Are getting the dreaded #DELETED in
the cells after to insert. You may need to turn row versioning on in
the ODBC settings.
Michael
Joe Conway wrote:
> Roderick A. Anderson wrote:
>
>> Short story. Pg 7.2 running on a Linux box. MS Access 2000 on WinXP
>> Pro. I can query and fiddle with the data in Access but I haven't
>> figured out how to get the changes back into Pg.
>
>
>>
>> Quick; please someone hit me with a cluestick! Or if it's too far to
>> reach is there a tutorial on using MS Access and Pg together?
>
>
> It's been a long time since I've messed with MSAccess/pgsql, but IIRC,
> you need to be sure your table has a primary key defined to get a
> writeable recordset. Also, make sure the linked table on the Access
> side reflects that.
>
> HTH,
>
> Joe
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: @#$%^& Access and PostgreSQL
@ 2004-06-17 18:03 Roderick A. Anderson <raanders@acm.org>
parent: Michael Calabrese <m2calabr@yahoo.com>
0 siblings, 0 replies; 11+ messages in thread
From: Roderick A. Anderson @ 2004-06-17 18:03 UTC (permalink / raw)
To: pgsql-odbc
On Thu, 17 Jun 2004, Michael Calabrese wrote:
> Are you getting any error messages. Are getting the dreaded #DELETED in
> the cells after to insert. You may need to turn row versioning on in
> the ODBC settings.
> Michael
Sorry to all for not updating you.
I sorted it out. It was the linked table issue -- mine were not. I'm
hooked up and editing now. I haven't had a need to insert anything yet as
most of the entry is done via a web form and scripts.
Rod
--
"Open Source Software - You usually get more than you pay for..."
"Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL"
^ permalink raw reply [nested|flat] 11+ messages in thread
end of thread, other threads:[~2004-06-17 18:03 UTC | newest]
Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-12-04 05:49 access and postgresql Sezmillenium <sezmillenium@yahoo.es>
2003-12-05 17:59 ` nobody <nobody@nowhere.near.here>
2003-12-04 16:40 Re: [bayes] access and postgresql Andrew Ayers <aayers@eldocomp.com>
2004-06-14 23:50 @#$%^& Access and PostgreSQL Roderick A. Anderson <raanders@acm.org>
2004-06-15 01:23 ` Re: @#$%^& Access and PostgreSQL Joe Conway <mail@joeconway.com>
2004-06-15 15:16 ` Re: @#$%^& Access and PostgreSQL Jeff Eckermann <jeff_eckermann@yahoo.com>
2004-06-17 17:22 ` Re: @#$%^& Access and PostgreSQL Michael Calabrese <m2calabr@yahoo.com>
2004-06-17 18:03 ` Re: @#$%^& Access and PostgreSQL Roderick A. Anderson <raanders@acm.org>
2004-06-15 13:30 ` Re: [Maybe Spam] @#$%^& Access and PostgreSQL Greg Campbell <greg.campbell@us.michelin.com>
2004-06-15 14:59 Re: @#$%^& Access and PostgreSQL Philippe Lang <philippe.lang@attiksystem.ch>
2004-06-15 17:31 ` Re: @#$%^& Access and PostgreSQL Roderick A. Anderson <raanders@acm.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox