dbTalk Databases Forums  

Importing databases with missing fields

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Importing databases with missing fields in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marco Dieckhoff
 
Posts: n/a

Default Importing databases with missing fields - 08-18-2004 , 04:57 AM






Hi!

I often have to import dbase5-databases of different versions into
my SQL Server.

I'm using a dts package and dtsrun to do it quick and automized.


Newer dbase-databases are always based on the old ones.

So it's like:

Version 1:
index
field1
field2

Version 2:
index
field1
field2
otherfield
morefields

When a new version is placed I upgrade my dts package to import
that version.
But I can't import old versions, I get an error -2147217904 (80040E10)
all the times.


I wonder if I can't tell DTS to set all "missing" fields in the source
dbase file to NULL when importing a version 1 file, and stop that error
from occuring?



Error report (I get it on german and translated it, so please don't
poke about wrong words

DTSRun: running
DTSRun: starting
DTSRun OnStart: Copy Data from impS to [Database].[dbo].[Table] step
DTSRun OnError: Copy Data from impS to [Database].[dbo].[Table] step, error = -2147217904 (80040E10)
Error String: Missing value for at least one needed paramater
Error Source: Microsoft JET Database Engine
Help File:
Help Context: 5000000

Error Details:
Error: -2147217904 (80040E10); Provider error: 0 (0)
Error String: Missing value for at least one needed paramater
Error Source: Microsoft JET Database Engine
Help File:
Help Context: 5000000

DTSRun OnFinish: Copy Data from impS to [Database].[dbo].[Table] stop
DTSRun: package finished

--
Marco Dieckhoff
icq# 22243433
GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keys

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Importing databases with missing fields - 08-22-2004 , 04:49 AM






In message <dolbv1-0gt.ln1 (AT) hamlet (DOT) frbr.etc.tu-bs.de>, Marco Dieckhoff
<dieck (AT) gmx (DOT) de> writes
Quote:
Hi!

I often have to import dbase5-databases of different versions into
my SQL Server.

I'm using a dts package and dtsrun to do it quick and automized.


Newer dbase-databases are always based on the old ones.

So it's like:

Version 1:
index
field1
field2

Version 2:
index
field1
field2
otherfield
morefields

When a new version is placed I upgrade my dts package to import
that version.
But I can't import old versions, I get an error -2147217904 (80040E10)
all the times.


I wonder if I can't tell DTS to set all "missing" fields in the source
dbase file to NULL when importing a version 1 file, and stop that error
from occuring?

You will not be able to use the same package for both files without any
changes as the connection is expecting certain columns. If the column is
not there then it thinks the file is invalid. You could try and
workaround this by using a SQL query instead of a specific table, such
that you fudge the data to look the same when it gets into the DataPump.

For V1 use-
SELECT index, field1, field2, null as otherfield, null as morefields
FROM table

For V2 use-
SELECT index, field1, field2, otherfield, morefields
FROM table

You would need to detect at run-time the file type and update the SQL
dynamically. This concept woudl work fro SQL Server, so I hope it fits
for dbase as well, but sorry I haven't tested it.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.