create and execute a dts package using asp - fails with varying no of columns in file -
07-12-2004
, 11:37 AM
Hi,
After a lot of research and online help and also using the DTS wizard
option in the Enterprise Manager, I was able to develop a program in
asp that creates a DTS package
starting from setting up the connections, the tasks and the final
execute to import data
from a text file to a table.
I started of by doing a creating a sample DTS package using the DTS
wizard in enterprise manager and saved the source code as vb file and
then modified the vb code to asp code.
Everything works but I have some problems when I try to add more
custom options on the package being created.
For example, int the sample dts i created the file had 4 columns. Now
if I change the file and the file contains more or less columns, then
the package fails. I am sure there is a property in one of the DTS
objects where we can specify the no of columns.
I tried changing the following property:
oTransformation.TransformPhases = no of columns
but the package still fails.
I even tried duplicatiing the dts package again using the DTS wizard
in the enterprise manager and I found that the value for the above
said property changes according to the no of columns you have in your
file.
Even if I hard code the no of columns value for another file in my
source code, it still fails. So my code only works for the same no of
columns I created the sample DTS with.
Can anybody point me to the property specification or even a book
which specifies the different proeprties and values for the various
DTS objects available on sql 2000.
I tried going through the sql books online, they give only a vague
reference. I can't seem to land the right reference help.
If anybody can point me to the right reference or even recommend a
book that has the information, please let me know.
Thank you for your help.
Yasir |