DTS Packages & Text Files don't play nicely. At least, not when *I* ask them to.
Hi Folks,
After just lurking for so long, and rabidly reading what everyone else has to say, I figured it was time for me to step in.
And I have a problem that Google can't seem to solve.
I created a DTS package that copies a text file into a database using the wizard, saved as VB, and upgraded to VB.NET (using http://www.sqldts.com/default.aspx?6,104,264,0,1.) If I run the package as soon as I create it, from within SQL Server, it works perfectly.
However, I'd like to run the DTS package from a windows service upon discovering a new file in a directory. I have the windows service all set up and working (side note: must talk more about the ease, practicality and general amazingness of windows services!) calling the .bas file as needed... but it fails every time, with the following:
-------------------
Package Steps execution information:
Step 'Copy Data from TheTextFile to MyDatabase Step' failed
Step Error Source: Microsoft Data Transformation Services Flat File Rowset Provider
Step Error Description:Incomplete file format information - file cannot be opened.
Step Error code: 80004005
Step Error Help File:DTSFFile.hlp
Step Error Help Context ID:0
Step Execution Started: 4/22/2003 12:20:46 PM
Step Execution Completed: 4/22/2003 12:20:49 PM
Total Step Execution Time: 2.937 seconds
Progress count in Step: 0
-------------------
I found several posts to the microsoft.public.sqlserver.dts group, but none that solved the problem: I'm already using SQL Server 2k; and, I need to pass the DTS package the name of the file to import, so I can't run the package from SQL Server itself. (I did check and the name of the file is being successfully passed.)
Anyone have any ideas?