Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL 2005 Express - Connnection issue
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

5 Posts

Posted - 11/12/2007 :  11:29:36  Show Profile  Reply with Quote
I´ve set up a local database on my hosted webserver, and successfully connect to it using Management Studio as well as sqlcmd. But when I try to connect to it through my web application I get problems. I´ve enabled TCP/IP and Named pipes for my SQL Express instance.

My Connstring: "Driver={SQL Native

I get a "[Microsoft][SQL Native Client]TCP Provider: No such host is known." error, and I suspect that the firewall might be the problem, but don´t have access to that at the moment.

Any ideas?

Jakob, Sweden

Flowing Fount of Yak Knowledge

7266 Posts

Posted - 11/12/2007 :  22:12:25  Show Profile  Reply with Quote
Is it correct instance name? Tried with host_name\sqlexpress? Does web app run on that sql server?
Go to Top of Page

Starting Member

5 Posts

Posted - 11/13/2007 :  01:52:26  Show Profile  Reply with Quote
Seems like this just turned into an ASP-question: =)

This VBScript works:

set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Driver={SQL Native Client};Server=.\SQLEXPRESS;Database=my_database;Uid=my_user;Pwd=my_password;"


But this JSCRIPT gets the above error:

var conn = Server.CreateObject("ADODB.Connection");
conn.Open("Driver={SQL Native Client};Server=.\SQLEXPRESS;Database=my_database;Uid=my_user;Pwd=my_password;");


The exact same script works on my local web server (IIS 5.1).

Edited by - jakobt on 11/15/2007 05:20:24
Go to Top of Page

Starting Member

5 Posts

Posted - 11/13/2007 :  07:34:06  Show Profile  Reply with Quote
Made a DSN-connection instead and it started working... don´t ask me why...
Go to Top of Page

Patron Saint of Lost Yaks

30421 Posts

Posted - 11/13/2007 :  07:45:59  Show Profile  Visit SwePeso's Homepage  Reply with Quote


E 12°55'05.25"
N 56°04'39.16"

Edited by - SwePeso on 11/13/2007 07:47:11
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000