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="ADODB.Connection"/>
<object id="cn" progid="ADODB.Connection"/>
<script language="VBScript">
Option Explicit
Dim strSQL,ver
ver = "thisver"
strSQL = "SELECT" _
& " (Acct) AS [Acct]," _
& " (Jan) AS [Jan]," _
& " (Feb) AS [Feb]," _
& " (Mar) AS [Mar]," _
& " (Apr) AS [Apr]," _
& " (May) AS [May]," _
& " (Jun) AS [Jun]," _
& " INTO testload.csv" _
& " FROM test.csv where Ver='"&ver&"'"
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source='C:\incoming\test';" _
& "Extended Properties='Text'"
cn.Execute strSQL, , adCmdText
cn.Close
'script to load data
'------
</script>
</job>
Any help will be greatly appreciated.
- 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="ADODB.Connection"/>
<object id="cn" progid="ADODB.Connection"/>
<script language="VBScript">
Option Explicit
Dim strSQL,ver
ver = "thisver"
strSQL = "SELECT" _
& " (Acct) AS [Acct]," _
& " (Jan) AS [Jan]," _
& " (Feb) AS [Feb]," _
& " (Mar) AS [Mar]," _
& " (Apr) AS [Apr]," _
& " (May) AS [May]," _
& " (Jun) AS [Jun]," _
& " INTO testload.csv" _
& " FROM test.csv where Ver='"&ver&"'"
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source='C:\incoming\test';" _
& "Extended Properties='Text'"
cn.Execute strSQL, , adCmdText
cn.Close
'script to load data
'------
</script>
</job>
Any help will be greatly appreciated.