#1
|
|||
|
|||
Passing arguments to plain text file
Hello everybody, I'm new in this forum, but and old SecureCRT user.
I would like to ask if any can help me to resolve this needed: As database administrator, I use SecureCRT daily and from long time ago I had been customizing by vbs scripting some tasks for my daily work. So, right now I'm little stuck with something maybe very easy to resolve. Actually I use plain text files with several SQL queries, that files I call by vbs script in SecureCRT. I mean, I have a vbs file with something like this example: Code:
Const ForReading = 1 Const ForWriting = 2 Sub Main crt.Screen.Synchronous = True Dim fso, file, sql_id sql_id = InputBox ("Por favor, introduzca el SQL_ID.") Set fso = CreateObject("Scripting.FileSystemObject") strFile = "F:\_Work_Center\SecureCRT\sqlScripts\SQL_ID_Stats.sql" Set file = fso.OpenTextFile(strFile, ForReading, False) Do While file.AtEndOfStream <> True str = file.Readline crt.Screen.Send str & Chr(13) Loop crt.Screen.Synchronous = False End Sub I would like to incorporate now to the call of the .sql file, arguments in order to the SQL sentence catchs the parameters than I send by the vbs file. For example in a normal execution of my .sql file passing arguments, I need to write something like this in the command interface (running in ORACLE SQL*Plus): @/PATH/OF/SQL_FILE/sqlfile.sql ARGUMENT where <ARGUMENT> is the value where the content of the sqlfile.sql will catchs or process.. I would be very grateful for any help or suggestions you could give me in this regard. Thanks in advance! PD.: Sorry for my bad english grammar... |
#2
|
|||
|
|||
Hi CustomX,
What version of SecureCRT are you using? We are not really familiar with all things SQL, so I am not sure how much help we can provide. How would you accomplish this task manually? Please be as explicit as possible when listing the steps.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|