Solved

How to create a mirror of a linked table in MS ACESS.

Posted on 2016-10-17
5
75 Views
Last Modified: 2016-11-03
Thank you all in advance!

We have a linked table in MSACCESS. It is linked to a data source hosted by Smartsheet. While I am able query the table in MS ACCESS and pull back real time data, I am not able to see the table when creating an ODBC source in SSIS. Thus, I am unable to import realtime data to SQL. However, when I make a "static" copy of the table, I can see the table from SSIS no problem...except the data is not current.

How can we keep the data in the static table current without setting off MS ACCESS notifications? Since the static table (the copy of the linked table) has a key, Running append queries against the Static Table will generate notifications each time a macro kicks off the append. I understand their is way to write some vb code to pull this off but am not clear on how. Do I create vb code for the append query or for the macro kicking off the query...or both?

Thank you all in advance!
0
Comment
Question by:Victor Nares
5 Comments
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 41847360
I would create a small VBA function that:

disables warnings (set warnings false)
deletes contents
appends all records

I didn't understand your key comment
1
 
LVL 7

Expert Comment

by:COACHMAN99
ID: 41847381
docmd.set warnings false
docmd.runsql "delete * from static table"
docmd.runsql "insert into static  table select whatever from source table"

the data will only be as current as the last run
1
 
LVL 19
ID: 41847388
> "I am not able to see the table when creating an ODBC source in SSIS"

add a link to the SSIS table(s) in the database that links to Smartsheet.  To be able to know what was added and updated since you last synchronized*, add tracking fields to the data structure:

dtmAdd, date/time, default value =Now()
dtmEdit, date/time, default value =Now() -- update with code when information changes.  If a form is used, you can use the form BeforeUpdate event.

* you will also need to store the date/time each time data is synchronized
1
 
LVL 36

Accepted Solution

by:
PatHartman earned 500 total points
ID: 41848858
I would use Crystal's suggestion to link to the data source in SSIS.


BTW, if you go the route of running an append or make table query and want to suppress warnings, I suggest turning the hourglass on when you turn warnings off and then when you turn warnings back on, turn the hourglass off.  I created two macros so I could type one instruction and never forget to manipulate the hourglass.  Having the hourglass on gives you a visual clue that the warnings are still off.  

Having warnings off is so dangerous that you have only to be bitten once to never, ever forget how dangerous that setting is.  Access has conditioned us to simply close objects and it prompts us to save if it determines that we have modified the object.  Well, if warnings are off, you don't get this warning so you can potentially lose hours of work as Access silently discards your changes because you left warnings off and forgot to specifically save before closing an object.
0
 

Author Closing Comment

by:Victor Nares
ID: 41872642
Thank you for your help!

I wound up finding an ODBC driver that allows SSIS to connect directly to Smartsheet.

Thanks again!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question