472,992 Members | 3,704 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,992 software developers and data experts.

Help Using DTS to import multiple tables into Access Database

38
I need some help.

Im using a dtsrun command to import 9 tables into an Access database, most of the tables have about 1000 rows, but one has 20000+ rows and grows everyday. Im Using Access 2003 and SQL Server 2000. on a WinXP Machine

When the database is opened a stored procedure drops all the tables and then imports the csv files using dtsrun. The database is only used for reporting and the data is entered into the csv files using 3rd party systems,

What i want to know is if there is a way to only import new rows, or rows that have been changed into the database, so i dont have to drop the tables everytime the database is opened.

I have seen one way to do this is to use temporary tables and import the data to the temp tables and the compare teh temp tables with the actual tables, and the insert and update the new rows, but this solution still has to import all the rows before hand and will take longer then it takes now

Here is my stored procedure:

Expand|Select|Wrap|Line Numbers
  1. set ANSI_NULLS ON
  2. set QUOTED_IDENTIFIER ON
  3. GO
  4. ALTER  PROCEDURE [dbo].[FillDatabase]
  5. AS
  6.     SET NOCOUNT ON
  7.         DELETE FROM dbo.Cards
  8.         DELETE FROM dbo.Meter
  9.         DELETE FROM dbo.Products
  10.         DELETE FROM dbo.Settlement
  11.         DELETE FROM dbo.Sites
  12.         DELETE FROM dbo.Stock
  13.         DELETE FROM dbo.Tanks
  14.         DELETE FROM dbo.Transactions
  15.         DELETE FROM dbo.Users
  16.  
  17.         DECLARE @Result BIT
  18.  
  19.         EXECUTE @Result = master..xp_cmdshell 'DTSRun /N "PropogateFuelDatabase" /F "C:\Program Files\TransHost\Reports\Reports Database\PropogateFuelDatabase.dts" /A Instance:8="frontpc\fieldwicks" /W "-1"'
  20.         IF ( @Result = 1 )
  21.             BEGIN
  22.                 RAISERROR( 'Error translating data', 18, 1 )
  23.  
  24.                 RETURN
  25.             END
  26.     SET NOCOUNT OFF
  27.  
Cheers

Terry
Mar 28 '07 #1
1 2749
iburyak
1,017 Expert 512MB
You said:

I have seen one way to do this is to use temporary tables and import the data to the temp tables and the compare teh temp tables with the actual tables, and the insert and update the new rows, but this solution still has to import all the rows before hand and will take longer then it takes now
You can link Access to server tables using ODBC this way you dont have to import anything just compare data and insert\update\delete differences.
Mar 28 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Doug Baroter | last post by:
Hi, One of my clients has the following situation. They use Access DB for data update etc. some business functions while they also want to view the Access data quickly and more efficiently in...
3
by: Michael Persaud | last post by:
HI, I have a xml file and would like to import its contents into a table in SQl2000 can some one say how? it has to insert multiple records Thanks MP
13
by: Aladdin | last post by:
I have an MS Access form on which I have a listbox listing tables in that database. I want to be able to click on any of those tables and view its contents on the same form using subforms or any...
6
by: Don Leverton | last post by:
Hi All, I've got a situation where I am developing an Access 97 app for a client, and am in the "beta testing" stage. I have split the app up, using the DB splitter, into front-end /back-end...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
7
by: Pete | last post by:
I need to import multiple tab delimited files for which I do not have the formats. All files have column headers in the the line. The files must be dynamic. The only common value is that the...
4
by: theintrepidfox | last post by:
Dear Group Excuse my ignorance but I have never come across this problem and need some advice. I have two copies of the same MS Access 2000 database. One from about 6 months ago ond one recent...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.