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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbs to initiate SQL analyzer with text box for variable

Status
Not open for further replies.

03Explorer

Technical User
Sep 13, 2005
304
US
I am going out on a limb by asking this question. I know some vbs but not enough to do this from scratch, if possible.

Can I create a script that once initiated, prompts for some manual values to be entered. Click 'ok' and it opens Query Analyzer, Executes a specific sql statement using the entered values?

Can someone either help with this or give directions to a good source to learn.

My intentions are to make some of our SQL code less touched. Allow the person executing, only the use of the variable and not mess with the sql code itself.


Thank you in advance.

P.S. not set on using vbs, just don't have vb to build currently.
 
You can use an input box to grab data to use in a command. Here is a simple example.

Code:
answer = InputBox("Enter some text","User Input Required")
WScript.Echo "The user typed:" & answer

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top