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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Calls to a SQL DTS Package

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-12-16 : 10:05:40
John writes "I have created a DTS Package which imports from a dbaseIII free table into a SQL table called "results". I wish to call the DTS Package somehow from either 1. A sql statement, 2. A stored procedure, or 3. From an ASP Page. I upload a DBF File via web browser file control.
The dbf file will be only used once for the upload. I am uploading the file via the browser. Once it is in the default directory /data, there will be a variable called something like "VarSessionDbfFileName" which will be for example, "export.dbf" (in this case, but will vary) so once the file "export.dbf" is uploaded I want to trigger the dts script like so "excecute DTS.DBFTOSQL?SourceFile=VarSessionDbfFileName" it will then run the script against the recently uploaded DBF file. The DTS script imports into a SQL table, "results". I then have the stored procedure "SP_ADD_STUDENTS" run which copys the data from "results" to the "student" table but checks on the #UV_UVID# (unique forigen key)field to make sure it is not allready existent. Once copyied the table "results" is wiped clean. So my question is How do i call the DTS package to excecute and sending it the variable to use the recently uploaded dbf file as its source. (Note the file structure will never change in either the dbf or sql table it will allways remain the same) Your help is greatly appreciated. Thanks"
   

- Advertisement -