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