SQL Express Connection Problem

  • Hello,

    I am using Pivot table in Excel and get the data from Remote SQL Server.

    The following connection works fine in all systems (all users) except MINE:

    Set objCon = New ADODB.Connection

    objCon.ConnectionString = "Provider=sqloledb; Data Source='xxxxx.whp.server-hosting.com'; Initial Catalog='xxxxxxx_default'; User ID='xxxxxxxxxxxxxx'; Password='xxxxxxx';"

    objCon.Open objCon.ConnectionString

    Set getOpenConnection = objCon

    However when I add "\sqlexpress" to the Data Source, I am able to connect to the Database and the Data is getting refreshed.....

    Set objCon = New ADODB.Connection

    objCon.ConnectionString = "Provider=sqloledb; Data Source='xxxxx.whp.server-hosting.com\sqlexpress'; Initial Catalog='xxxxxxx_default'; User ID='xxxxxxxxxxxxxx'; Password='xxxxxxx';"

    objCon.Open objCon.ConnectionString

    Set getOpenConnection = objCon

    Please help me with this. What might be the issue with my system. What Option I need to change to make it work without "\sqlexpress".

    Thanks,

    Manosh

  • My first guess would be that on all the other client PC's an ALIAS has been setup for the SQL Server instance leaving out \SQLExpress. YOu would do this using the SQL Server Configuration Manager -> SQL Native Client Configuration -> Aliases

  • Many Thanks... It worked...

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply