Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on incorporating wsf file into an asp page 1

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
US
I have a Windows script file that does the following:

- query and reformat a text file into a csv file
- load data into our oracle database

How can I use this wsf into my asp page. I tried testing it with <a href=test.wsf>Click here</a> and it didn't work.

Here is my wsf file;
<job>
<reference object=&quot;ADODB.Connection&quot;/>
<object id=&quot;cn&quot; progid=&quot;ADODB.Connection&quot;/>
<script language=&quot;VBScript&quot;>
Option Explicit
Dim strSQL,ver
ver = &quot;thisver&quot;
strSQL = &quot;SELECT&quot; _
& &quot; (Acct) AS [Acct],&quot; _
& &quot; (Jan) AS [Jan],&quot; _
& &quot; (Feb) AS [Feb],&quot; _
& &quot; (Mar) AS [Mar],&quot; _
& &quot; (Apr) AS [Apr],&quot; _
& &quot; (May) AS [May],&quot; _
& &quot; (Jun) AS [Jun],&quot; _
& &quot; INTO testload.csv&quot; _
& &quot; FROM test.csv where Ver='&quot;&ver&&quot;'&quot;
cn.Open &quot;Provider=Microsoft.Jet.OLEDB.4.0;&quot; _
& &quot;Data Source='C:\incoming\test';&quot; _
& &quot;Extended Properties='Text'&quot;
cn.Execute strSQL, , adCmdText
cn.Close

'script to load data
'------
</script>
</job>

Any help will be greatly appreciated.

 
You could run this script using WScript.Shell
Code:
Set WshShell = Server.CreateObject(&quot;WScript.Shell&quot;)
Set oExec = WshShell.Exec(&quot;test.wsf&quot;)

'oExec.Status it's the status of the executing script


________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top