I'm just getting started with script programming and want to verify that I can use vb script to read data from sql server. I am testing by trying to open the 'pubs' database.
on error resume next
Set con = CreateObject("ADODB.Connection")
constring = "Provider=SQLOLEDB.1; Data Source=mydatasource; Initial Catalog=Pubs; user id = sa; password=''"
con.open = constring
I get the error "SQL Server does not exist or access denied".
Should this work?