LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Passing SQLPlus script location using Windows Script Host Object Model

Ok,

So I haz lots of scripts that are generated by a team in my organisation which need to then be processed via SQLPlus

Basically we/me get loads of emails with the script location @Z:/aFolder/aScript.sql;

We then have to process them individually by opening up SQLPlus and pasting the file location in there ;"

I have been looking into a way to automate this via either c# or VBA

I think that the Windows Script Host Object Model option via VBA is a good one

Example:


Option Explicit

Sub SQLPlus(strFilePath)

Dim WShell As New WshShell
WShell.Run "sqlplus " & strFilePath

End Sub

Sub test()

Call ;")

End Sub

Only issue is that I get an error from passing that last file location in the "SP2-0310: unable to open file location "Z:/aFolder/aScript.sql;"

Am I missing a special character or something from this?

I pass the @ sign into the string but its not recognised on the command line??

Any input greatly appreciated, thanks.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Script Host in Excel VBA jasontferrell Excel Programming 10 November 4th 09 09:27 PM
PASSING PARAMETER FORM DOS script to Excel BruceWyne Excel Programming 4 November 3rd 06 03:02 AM
Passing Data to a Line in a VBA Script Danny Young Excel Programming 1 October 12th 06 06:14 AM
Pass a variable back to the host script? mb Excel Programming 2 October 29th 05 07:02 PM
Use Windows Script to run Windows Explorer Search? Ian Elliott[_3_] Excel Programming 0 January 12th 04 05:03 PM


All times are GMT +1. The time now is 09:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"