Problem connecting to SQL Server 2008 over local connection

Posted on 2009-04-28
Last Modified: 2012-05-06
I just had SQLServer2008 installed on a computer with Vista Home Premium SP1.  I added a test database with one table and two fields in the table.  

I am trying to test the connection from another computer in our office.   I am using a vb6 program that connects fine to remote SQL Server (I don't know the version number).  The connection string that works for the other SQL Server is:   Provider=sqloledb;Data Source=xx.xx.xx.xx;initial Catalog=mydbname;User Id=myusername;Password=mypassword;

I've tried several variations of connection strings and none of them have worked.

Right now, with this connection string:   "Provider=sqloledb;Data Source=EXCELSS-PC\SQLEXPRESS;Initial Catalog=myTest;User ID=Excelss;Password=popcorn;"

where EXCELSS-PC is the computer name.

I"m getting the following error:

Run-time error '-2147467259 (80004005)':

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

I am guessing that I'm either using the wrong information for datasource, username, and password . . .or there is something going on with the security on the windows side.   From 'Network', I can see EXCELSS-PC and if I double click on it, I can use the username and password above to get to the shared resources (only the printers folder).

Any thoughts?
Dim cn As adodb.Connection

    Set cn = New Connection

    cn.ConnectionString = "Provider=sqloledb;Data Source=EXCELSS-PC\SQLEXPRESS;Initial Catalog=myTest;User ID=Excelss;Password=popcorn;"


Open in new window

Question by:lthames
    LVL 7

    Expert Comment

    try connecting through sql management studio first
    LVL 11

    Expert Comment

    Configure the local Windows Firewall on the SQL Server machine to allow traffic to TCP Port 1433. This will enable remote connections to the SQL Server databases.

    I am not familiar with SQL Server 2008, but you may have to also configure SQL Server 2008 to allow remote connections. You do this in SQL Server 2005 using the Surface Area Configuration utility

    Author Comment

    The firewall is turned off and the server is set to allow remote connections.

    I don't have sql management studio on any of the other pc's in our office.
    LVL 7

    Expert Comment


    Accepted Solution

    There was something wrong with the database.  The tech couldn't even find what it was . . but created a new database and it worked.


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now