Solved

SQL Server to Microsoft Access data transfer

Posted on 2011-03-23
4
227 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
  • 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 84
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 84

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
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…
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…

911 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

24 Experts available now in Live!

Get 1:1 Help Now