?
Solved

Automate QODBC Table to Access Table Import

Posted on 2013-01-31
2
Medium Priority
?
971 Views
Last Modified: 2013-02-04
I run reports against a QuickBooks database using a 3rd party ODBC tool called QODBC.
This works fine, but can be slow when doing involved reports.

If I use the QODBC to import into an access database, copying just the tables I need, the solution is very fast.

The problem is, I have to do the ODBC to Access import manually.  And since the Access Database isn't being udpated, the moment it's created it's outdated.  That's fine for the reports we generate, but it would be ideal if the Database was updated once per day, like at 2am or so.

Is there a way in VB.NET to copy a QODBC table to an Access database - if the Table already exists, to erase it and replace it with the new data?

I'm looking for some examples of this -  As an example, some reports take 15 minutes to run simply using QODBC.  After importing the data in Access, the report runs in 30 seconds.  This could be an awesome solution if I can get the import automated.

Thank you!
0
Comment
Question by:slightlyoff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 38841778
I believe you can create linked tables with the QODBC driver. If so, then the simplest way to do this is to create the linked table, and then run a SELECT INTO query to create your table as needed.

You'd need to run a few SQL statements to do this:

YourConnection.Execute "DROP TABLE YourLocalAccessTable"
YourConnection.Execute "SELECT * INTO YourLocalAccessTable FROM YourLinkedQODBCTable"

You can do this through an OLEDB/ODBC connection in your .net program, or you could setup a simple macro in the Access database that could be run as needed.

You can run a macro using a command line from a Schedule Task:

"full path to msaccess.exe" "full path to your database" /x macroname
0
 
LVL 1

Author Closing Comment

by:slightlyoff
ID: 38852171
Thank you for your help!!!  

Also, for anyone following up on this - I found a link with the exact code I needed: http://www.access-programmers.co.uk/forums/showthread.php?t=169349
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In this article, we’ll look at how to deploy ProxySQL.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Suggested Courses

764 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