Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Problem connecting to SQL Server 2008 over local connection

Posted on 2009-04-28
5
Medium Priority
?
473 Views
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;"
 
    cn.Open

Open in new window

0
Comment
Question by:lthames
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:orcic
ID: 24251316
try connecting through sql management studio first
0
 
LVL 11

Expert Comment

by:bmatumbura
ID: 24251558
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
0
 

Author Comment

by:lthames
ID: 24251832
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.
0
 

Accepted Solution

by:
lthames earned 0 total points
ID: 24252859
There was something wrong with the database.  The tech couldn't even find what it was . . but created a new database and it worked.

0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

578 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