Solved

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

Posted on 2016-10-17
5
53 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 34

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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now