![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Experts I have written a dts exporting data from SQL to Excel and the data is exported fine, however when I save the dts as VB and run it from VB, it just exports the headings of the table into Excel, but does not export the data in the table. What am I doing wrong? I know I have data in the table because after running the dts from the wizard, I open the Excel file and the data is all there. However when I open and run it in vb there is only the headings. Thanx for all your help in advance Kind Regards |
#3
| |||
| |||
|
|
"poppy" wrote: Hi Experts I have written a dts exporting data from SQL to Excel and the data is exported fine, however when I save the dts as VB and run it from VB, it just exports the headings of the table into Excel, but does not export the data in the table. What am I doing wrong? I know I have data in the table because after running the dts from the wizard, I open the Excel file and the data is all there. However when I open and run it in vb there is only the headings. Thanx for all your help in advance Kind Regards Hi again I just stumbled on the fact that I forgot to include the password to the db in the code and that is why I was not recieving the data from the table. I have another question. It seems from the code that data can only be manipulates as a group. e.g. Set oColumn = oTransformation.SourceColumns.New("Discount", 13) oColumn.Name = "Discount" oColumn.Ordinal = 13 oColumn.Flags = 120 oColumn.Size = 0 oColumn.DataType = 131 oColumn.Precision = 10 oColumn.NumericScale = 2 oColumn.Nullable = True I wonder if it is possible to manipulate data in every record? e.g. |
#4
| |||
| |||
|
|
Why are you running the package like this? All you are doing is rebuilding a package each and every invocation and then firing the package. This will hurt for performance. If I is because you want to manipulate properties of the package at runtime then you could probably do this using a prebuilt package and calling that through VB. Once you have that then you can change properties of the package in your code. You could also do this using the Dynamic Properties task or by passing in variable values on the cmdline through the /A switch. |
#5
| |||
| |||
|
|
Hi Allan This is cause I don't know any better. In fact I started working with dts yesterday. I'm actually trying to help a collegue of mine. He says he has a number of dtss in sql and he wants to be able to store and fire them all in vb with out the object model? (not quite sure about this) He also wants to be able to manipulate each record when and if he needs to. How would I go about doing this: "prebuilt package and calling that through VB. Once you have that then you can change properties of the package in your code. You could also do this using the Dynamic Properties task or by passing in variable values on the cmdline through the /A switch." Thanx for all your help Kind Regards "Allan Mitchell" wrote: Why are you running the package like this? All you are doing is rebuilding a package each and every invocation and then firing the package. This will hurt for performance. If I is because you want to manipulate properties of the package at runtime then you could probably do this using a prebuilt package and calling that through VB. Once you have that then you can change properties of the package in your code. You could also do this using the Dynamic Properties task or by passing in variable values on the cmdline through the /A switch. |
![]() |
| Thread Tools | |
| Display Modes | |
| |