PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesPostgreSQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 13th, 2002, 08:26 AM
we_win we_win is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 6 we_win User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Linked Tables in Postgres ?

My company has MS ACCESS database. We are in a process of moving from MS ACCESS to Postgresql. However MS Access database is still used partly. I have a table in Ms Access which gets updated every hour. I want the data in this table to be reflected in a similar table within the Postgresql database, so that the moment this table gets updated, the change is also reflected in the postgres database table . Now, Linked table seems to be an answer, but does postgres have anything called Linked Tables and if yes, how do i create Linked Tables in the Postgres ?????

Your help would be greatly appreciated

Reply With Quote
  #2  
Old June 13th, 2002, 09:45 AM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Central Florida, USA
Posts: 2,306 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 6 h 42 m 51 sec
Reputation Power: 60
No, PostgreSQL does not have linked tables. Access is both a database and an application front-end. It is that application front-end that does the linking, not the internal Access database.

But, you can do things the other way around. If you have ODBC set up for PostgreSQL, then you can just export that Access table to PostgreSQL, and then have Access link out to that PostgreSQL table. This will be transparent to Access, but will make the data automatically be available in PostgreSQL.

If this is not an option, then you will have to do some sort of programming, to regularly send updates to the PostgreSQL database from the Access database.
__________________
The real n-tier system:

FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

Amazon wishlist -- rycamor (at) gmail.com

Reply With Quote
  #3  
Old June 13th, 2002, 02:55 PM
we_win we_win is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 6 we_win User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Macro to export table

Hey thank you Rycamore,
Now I have written a macro in Ms Access that exports the table to Postgres database (as per ur suggestion I did use ODBC) . But for a macro to execute properly - it requires the destination table name to be hardcoded. So if the name of the table in Access is order_file, the macro will execute fine for the first time. As soon as there is anohter update with the Access table in an hour - I would try to execute the same macro - however this time it will fail since the table / relation with name order_file already exists in the postgres database. So i m kinda stuck with te problem, i have to manaully go and drop the table before I run the macro. This defeats the whole purpose of automation since i have to check whether the order_file table has been updated every hour -If yes, I have to manually drop the table in Postgres and then run the macro.

Do you have any workaround so that the old order_file table within postgres automatically gets dropped and the macro is able to run successfully evertime.

Your help would be apreciated

Reply With Quote
  #4  
Old June 13th, 2002, 05:26 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Central Florida, USA
Posts: 2,306 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 6 h 42 m 51 sec
Reputation Power: 60
I will have to think about it a bit more. I'm sure there is a way to export to a table as an update, rather than as a new table.

I'm not at my Windows workstation right now, but I seem to remember something: when you are getting ready to export an Access dataset, the final dialog box has a button at the bottom that lets you set further options to the export. (somewhere in there, there is a button with further options). If you find that button, I think you might find a choice in there that allows you to overwrite a table, or just add updated records.

If this does not work, then your best bet is to simply export the table to PostgrkeSQL once, and then drop the table in Access, and replace it by connecting to the PostgreSQL table as a linked table. Then you don't need any macros to update PostgreSQL.

Reply With Quote
  #5  
Old June 13th, 2002, 06:43 PM
Noerr Noerr is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Dalec HI
Posts: 26 Noerr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
but you can link postgres tables same way you link tables from mdb/mde/msSQL, so no problem there, you can do queries on them.. We are working on migration too, and trying to decide wether to go with linking or just with pure code.
another good thing is that postgres supports auto Id in much better way than access. ie if you enter null or "" it will work as auto id, if you specify id it will keep it

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > Linked Tables in Postgres ?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap