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

SQL7-DSN-Less connection help needed

Status
Not open for further replies.

lloydanderson

IS-IT--Management
Sep 26, 2001
21
US
Hello,

I am trying to set up VB script in excel, using ActiveX 2.0
and have had no joy! Any helpful suggestions? I copied this off of MS

Option Explicit
' Declare object variables for the Connection and Recordset objects.
Private cnMrkseg As ADODB.Connection
Private rsMrkseg As ADODB.Recordset

Private Sub Worksheet_Activate()
' Instantiate the object.
Set cnMrkseg = New ADODB.Connection
' Instantiate the Recordset object, then set its properties.
Set rsMrkseg = New ADODB.Recordset
cnMrkseg.ConnectionString = _
"Provider=SQLOLEDB.1;Password=Market;" & _
"Persist Security Info=True;User ID=Market;" & _
"Initial Catalog=DailyMktSegnewSql;Data Source=Jdvproxy"
cnMrkseg.Open

Bombs with '3706' ADO could not find the specified provider

Lloyd
 
Hi, Lloyd

What is the name of your Database? That's what would go in the "Initial Catalog" portion of your connection string.

I am guessing that DailyMktSegnewSql is a SQL statement?

drost
 
Hi,

The database name is DailyMktSegnewSql (like to type)...
 
Thanks for testing this for me - It may be a rights issue - I will need to read more on how to put an excel program on an web server.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top