yes, that's the right forum. The name of the ASP Script language is "VBScript", and your program should have a .vbs extension if you're not using it in a web page. It's funny that some ASP coders have used it for years in web pages but they don't know they can run it stand-alone. Stand-alone is much easier, and you have a lot of Windows features that are much harder in a web page (like a MsgBox).
Make this file with Notepad, name it "connectTest.vbs", and then double-click on it from Explorer (watch out for line wrap):
--------
Dim strConnection, conn
strConnection = "Provider=SQLOLEDB.1;Password=xxx;Persist Security Info=True;User ID=qdbreports;Initial Catalog=qdb;Data Source=myserver"
' Remove the "Server." in front of CreateObject for use as a stand-alone pgm
Set conn = CreateObject("ADODB.Connection")
conn.Open strConnection
msgbox("it works")
------------------
If you see the "it works" message box, your string is good. If not, you'll see an error after the connect attempt times out. Then you need to modify your string and try again.
|