What the wizard does is it looks through the driver for the metadata of the
DBF file. If you want to emulate the wizard then you will also have to do
this. There is no "Magic" way of doing this at runtime by providing a DBF
name and a Table name and mapping the two (Creating the SQL Server table
dynamically)
This kind of thing would be really good as a custom task.
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Rahul" <anonymous (AT) discussions (DOT) microsoft.com> wrote
Quote:
Hi,
I have around 100 dbf files. I have to import the DBF files into SQL
server. Now i can do the same using the wizard. It works fine. Now if i try
|
to do the same using the DTS programming i am not able to do this. First of
all i can't get the structure of these DBF files in the classes provided in
DTS . If i am not getting the structure how can i create the new tables for
these DBF files in SQL. When i save the package generated by the SQL Server
Import/Export wizard it shows me the structure of each of the DBF files in
the procedures its creating for the package. What class shall i use so that
i can dynamically slect the DBF file in a function/ procedure and then
generate the structure of that DBF file and add that as a new task in pakage
before executing the package. Any links which can show me how to use DTS
with C# . Right now i have to use VB6.0 . Also if i use the module created
by DTS wizard with VB.NET it gives lots of errors as the new VB.NET does not
allow SET/LET not does the method call support parenthesis less parameters.
Please help ?