• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 121
  • Last Modified:

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

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
Victor Nares
Asked:
Victor Nares
1 Solution
 
COACHMAN99Commented:
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
 
COACHMAN99Commented:
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
 
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and ProgrammingCommented:
> "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
 
PatHartmanCommented:
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
 
Victor Naresdb DeveloperAuthor Commented:
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 recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now