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

Connection to SQL Server 2005 does not work!!!

Status
Not open for further replies.

neemi

Programmer
May 14, 2002
519
GB
I have a database which connects to SQL Server 2000 using the code below

Code:
'// Build ODBC connect string
    sODBC = "ODBC;"
    sODBC = sODBC & "UID=" & sUser & ";"
    sODBC = sODBC & "PWD=" & sPassword & ";"
    sODBC = sODBC & "DSN=" & sDSN & ";"
    sODBC = sODBC & "Database=" & sDatabase & ";"

'// Attempt Connect
    Set wsApp = DBEngine.Workspaces(0)
    Set dbODBC = wsApp.OpenDatabase("", False, False, sODBC)
    Set dbApp = wsApp.Databases(0)

however their has been a server upgrade to SQL Server 2005.

But I cannot connect to the database on the server anymore. It just tells me there has been a connection failure.

Help appreciated.

Do I need to rewrite the code etc.
Has anyone had the same problem.

Cheers,
Neemi
 
Sorry please ignore.

It does work!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top