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

connection - runtime error (Excel to SQL-Sever) 1

Status
Not open for further replies.

kingz2000

Programmer
May 28, 2002
304
DE
HI Guys,

I'm getting a connection problem when I try to open an adodb.connection to SQL-Server

Run-time error 2147217805(80040e73) Format of the initialization string does not conform to the OLE DB specification

I get the error on the con.open statement.

Here is my code:

Private Sub exec_SQL(strSQL As String)
Dim rowsAffected As Integer
Dim con As ADODB.Connection
Set con = New ADODB.Connection

con.Open "Driver={SQL Server];Server=X;Database=XX;uid=XXXX;pwd=XXXXX;"

con.Execute strSQL, rowsAffected
con.Close


End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top