Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
harmonium
Starting Member
5 Posts |
Posted - 2008-08-09 : 06:25:39
|
I have a DTS Package that imports text file data into my DB. Now there is a need for allowing the user to designate a database to connect to for importing text file data. The incoming data has columns that are enclosed in double quotes. I created a BCP file to use in a BULK INSERT command called in the DTS Package, but that keeps giving me errors on column names. Having the client rename the columns at this point may not be an option. Can someone lead me in the right direction to either how to properly use a type of variable to set the Database name or if I can use a UDL for the import or some other means to get this job done? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-09 : 07:25:26
|
I think you need to map the databse property value to a variable by means of dynamic properties task and then user can pass value while invoking DTS package to select the db. |
|
|
harmonium
Starting Member
5 Posts |
Posted - 2008-08-10 : 18:26:07
|
quote: Originally posted by visakh16 I think you need to map the databse property value to a variable by means of dynamic properties task and then user can pass value while invoking DTS package to select the db.
Is there no way to use the UDL to do this? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-11 : 00:19:42
|
is this what you're asking for?http://www.mssqltips.com/tip.asp?tip=1022 |
|
|
harmonium
Starting Member
5 Posts |
Posted - 2008-08-11 : 10:00:03
|
quote: Originally posted by visakh16 is this what you're asking for?http://www.mssqltips.com/tip.asp?tip=1022
No, I have a UDL that works well for running scripts and also works well running BULK INSERT commands, but the incoming data has columns that are surrounded by commas. When I use the DTS Import package the commas do not get imported. I tried creating a format file to get the data without the commas, but I keep getting errors. If I could import the data using the UDL and not get the commas I would be happy. |
|
|
|
|
|