Solved

SQL Server to Microsoft Access data transfer

Posted on 2011-03-23
4
257 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 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
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…

739 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