dbTalk Databases Forums  

DTS Programming DBF---->SQL

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


Discuss DTS Programming DBF---->SQL in the microsoft.public.sqlserver.dts forum.



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

Default DTS Programming DBF---->SQL - 12-08-2003 , 01:31 AM






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 ?

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS Programming DBF---->SQL - 12-08-2003 , 02:51 PM






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 ?




Reply With Quote
  #3  
Old   
Rahul
 
Posts: n/a

Default Re: DTS Programming DBF---->SQL - 12-08-2003 , 10:46 PM



Thanks for reply Allan. But if the wizard is able to look into metadata of the tables i select on the runtime, similarly DTS programming could have been provided with a class wherein we could use that class to read the metadata on the fly and create the table in SQL. I guess this is where i am actually stuck.

Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS Programming DBF---->SQL - 12-09-2003 , 04:38 AM



Nice idea and one that would be very very useful. DTS does not provide
anything out of the box like this. You can always mail
sqlwish (AT) microsoft (DOT) com to ask for this in a future release.

Like I said the way to do it would be to use a custom task written by
yourself.

--

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:
Thanks for reply Allan. But if the wizard is able to look into metadata of
the tables i select on the runtime, similarly DTS programming could have
been provided with a class wherein we could use that class to read the
metadata on the fly and create the table in SQL. I guess this is where i am
actually stuck.




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.