Solved

SQL Server to Microsoft Access data transfer

Posted on 2011-03-23
4
262 Views
Last Modified: 2012-05-11
We just added an old (NT 4.0 Workstation) computer to our business network as it powers a large Chop saw in our factory.  The saw operates via a software program that runs on the PC that access a local MS Access database on the C drive.

We want to populate the access database from a 2008 SQL Server with data on a daily basis (small amount of data - say 200 records.  These records are currently inputted by hand via the software program on the PC).  What is the best method? Can the SQLServer talk directly to the access database on the Nt Workstation? i have confirmed that there is no security on the access database
0
Comment
Question by:Bekster
[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
4 Comments
 
LVL 6

Expert Comment

by:ahdfx
ID: 35202658
I would say the best way would be to write a small application that would read the data off the SQL database, then do SQL queries into the Access DB.

Another option would be to export the data to a flat file (csv) then import that into Access.
0
 
LVL 85
ID: 35202669
Access can "link" the tables on the server database in most cases (assuming you have the correct drivers, etc). Once you "link" the tables, you can work with them as if they were local Access tables to a great extent.

As to populating the tables - you can do that with several methods, but the simplest is to use standard SQL to do this:

INSERT INTO YourSQLTable(Col1, Col2, Col3) Values(Val1, Val2, Val3)

That is quite simplistic, but that's the basics.

Where does the daily data load come from? Is this something generated by another program, or is this human-created data?
0
 

Author Comment

by:Bekster
ID: 35207190
The data is created from within the SQL Server, it will be available in a table every day (think a listing of larts needed base on the days order entry)
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 35209012
If the table and fields are constant (i.e. the tablename is the same, and the Fields in both the SQL Server and Access tables are the same), then just use an INSERT query to do it.

First, link the SQL table into the Access database. Use File - External Data - Link, then create a new ODBC data link. Once you do that, you'll see a list of the tables available in your SQL database. Choose the relevant tables, and your link will be created.

Now just use regular SQL to build an INSERT statement. You could do this on the click of a button, perhaps:

Currentdb.Execute "INSERT INTO YourLocalAccessTable(Col1, Col2, Col3) SELECT Col1, Col2, Col3 FROM YourLinkedSQLTable"

If you need to "clear out" the Access table first:

Currentdb.Execute "DELETE * FROM YourLocalAccessTable"
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
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.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

630 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