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

VBA error message from

Status
Not open for further replies.

hedgracer

Programmer
Mar 21, 2001
186
US
We have Access databases which we are converting from SQL Server 2005 back ends to SQL Server 2008 back ends for tables with the Access database as a front end. During the test conversion I ran a form which has a button and received the following error:

Run-time error'-2147467259 (800004005)':
[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied.

When I click debug it goes to the following vba code:


strCnxn = set_connection()
Set cnxn = New ADODB.Connection

cnxn.Open strCnxn ***THIS IS THE CODE IT GOES TO****

The set_connection() is as follows in a module:

Public Function set_connection()

set_connection = "Provider='sqloledb';Data Source='TSQLINST1/TSQLINST1';" & _
"Initial Catalog='Actg';Integrated Security='SSPI';"

End Function

Is there something I need to do differently for SQL Server 2008? Any help is appreciated. Thanks.

Dave


 
Ignore this message. I forgot to complete the subject line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top