Sorry for duplicated post (, but I find out I would rather make it through vbscript... I need to create connection to sql server - I need to pass some informations like Name, SQL Server name etc., but I dont know where and how should I begin :( Have anyone make script for something like this before? Looking forward for your answers...
0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


Set objODBC = CreateObject("ADODB.Connection")
objODBC.Open "PROVIDER=SQLOLEDB;SERVER=ServerName;UID=username;PWD=password;DATABASE=DatabaseName"

mySQL = "SELECT * FROM tablename Where criteria"

Set objRS = objODBC.Execute(mySQL)

While Not objRS.EOF
msgbox objRS("ColumnName")

wscript.echo "Completed"
Answered 02/18/2005 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
Answer this question or Comment on this question for clarity