Executing an SP from inside a SCRIPT - 09-24-2004 , 01:39 PM
I'd like to get a string stored in a SQL table directly into an ActiveX
Script. (More specifically, I am retrieving the name of a file which was the
last one processed. The log of files processed is already in a SQL table.
The table would be used to determine if the file has already been
That's the "what". I'm stuck on the "how". Any ideas would be greatly
Re: Executing an SP from inside a SCRIPT - 09-24-2004 , 02:24 PM
You can use the FileScripting object to return the Name of the file and use
that in a manner of ways:
Assign name to a global variable - use parameters in your query for the log
Assign name to global variable (optional, I guess) - build SQL statement to
modify your ExecSQL command with the filename
Inside of your ActiveX task, write the data to a table.
I think I'd stick with the first option where possible. Put a ? in your query
and Parameters should become a choice. Assign the appropriate variable to
"George Morton" <gmorton1 (AT) optonline (DOT) net> wrote:
Re: Executing an SP from inside a SCRIPT - 09-25-2004 , 02:33 AM
Use the ExecuteSQL task to query the table and assign the value to a GV.
SELECT filename FROM TABLE WHERE ................
Hit the parameters button and assign the filename value to a GV
In the Active Script task you can use the name of the file then from the GV
in any way you want
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"George Morton" <gmorton1 (AT) optonline (DOT) net> wrote