pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Davis <mdavis@sevainc.com>
To: 'DI Hasenohrl' <i.hasenoehrl@aon.at>
To: 'pgsql-interfaces@postgresql.org' <pgsql-interfaces@postgresql.org>
Subject: RE: RE: Question
Date: Wed, 4 Jul 2001 09:21:55 -0600
Message-ID: <01C1046A.C51F6CA0.mdavis@sevainc.com> (raw)

I wrote triggers in PostgreSQL to update a new table that I created to 
indicate when a local table has changed (insert/update/delete).  This new 
table contains a row for each local table and the date/time this table was 
last updated.  I also stored this table locally in Access.  I then wrote a 
procedure in Access97 that would compare the local and server copy of this 
table and look for any table that changed.  For each changed table, the 
Access procedure would link to the server table and copy the data from the 
server table to the local table.  I then called this Access procedure every 
time a user opened up the Access application and whenever a user opened any 
significant form.  You could do it for all forms, but I had many forms in 
my application so I chose to implement this only in the most important 
ones.  This was not necessarily easy to do but it worked great.

-----Original Message-----
From:	DI Hasenohrl [SMTP:i.hasenoehrl@aon.at]
Sent:	Wednesday, July 04, 2001 1:32 AM
To:	mdavis@sevainc.com
Subject:	Re: [INTERFACES] RE: Question

 << File: ATT00014.htm >> Hello Michael,

  1. Yes
  2. Using ODBC.
  3. In some cases, yes.  In particular, if you use a lot of combo boxes on 
  your Access forms and queries, they will be slow.  I took any tables that 
  were accessed a lot and updated a little and copied them into Access.  I
  wrote a script that would refresh the local Access copy of these tables
  whenever the server copy of these tables were updated.  This was not an
  easy thing to do but it really helped the performance of many of my 
Access
  forms.

  I hope this helps, Michael

  It seems, that I have the some problem of performance now, you had some 
time ago. So I made the same decision like you and work with local Access 
tables and Server tables. In order to synchronise the server tables with 
the Access tables, I asked the odbc-list, if there is a possibility, to 
send updates or inserts from postgresql-tables to local MsAccess-tables.

  I got the following answer:
  Don't think you can do this via ODBC.
  Have a "change" table and update a timestamp in it whenever a target 
table
  is updated. Then clients can poll once a minute or whatever and see if 
their
  local timestamp is older than the one in the change table.

  Now, I'm developing this solution and have some problems, how to manage 
the error-handling, realize transactions and so on....
  Please can you show me your way to synchronise server tables and Access 
tables

  Many thanks in advance
  Irina




view thread (3+ messages)

Message-ID: <01C1046A.C51F6CA0.mdavis@sevainc.com>
Permalink:  ../01C1046A.C51F6CA0.mdavis@sevainc.com/
Also on:    postgresql.org/message-id/01C1046A.C51F6CA0.mdavis@sevainc.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: mdavis@sevainc.com, i.hasenoehrl@aon.at
  Subject: RE: RE: Question
  In-Reply-To: <01C1046A.C51F6CA0.mdavis@sevainc.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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