Sunday, March 25, 2012

ASP to SQL 2005 - won't connect

Hi All,
I'm having a bit of a nightmare and could really do with some help.
Our office server is running SQL 2005 Express.
We have installed SQL 2005 Express in our remote web server. I want the web
server to 'collect' data from the office server over night. We cannot get
the two to connect.
We have an ASP file on our web server with following code:
<%
Dim connL
Set connL = Server.CreateObject("ADODB.Connection")
connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
address;Network Library=DBMSSOCN"
%>
When we run this page we get the error message:
[DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
Please help.
Regards
Andrew Ellinas
By default, SQL-Server 2005 Express won't allow for remote connection so you
have to enable TCP/IP using the the SQL Server Surface Area Configuration
tool. You should also make sure that there is no firewall blocking the port
1433. For reason I don't remember, it's better to simply use SQLOLEDB
instead of SQLOLEDB.1 and in the case of SQL-Server 2005, it's even better
to use the new provider SQLNCLI; see
http://connectionstrings.com/?carrier=sqlserver2005 . Finally, if you have
installed a named instance instead of the default instance, you must add the
name of the instance after the address of the server.
Are you able to connect to it using either MSSMS or MSSMSE?
Here a some other articles to help you troubleshooting your connection
problem:
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx
http://msdn2.microsoft.com/en-us/library/ms345318.aspx
http://www.datamasker.com/SSE2005_NetworkCfg.htm (second site for
connection strings for sql providers)
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Andrew Ellinas" <Andrew Ellinas@.discussions.microsoft.com> wrote in message
news:889ABEEF-F32B-4C1B-9B1A-C813367C8BF4@.microsoft.com...
> Hi All,
> I'm having a bit of a nightmare and could really do with some help.
> Our office server is running SQL 2005 Express.
> We have installed SQL 2005 Express in our remote web server. I want the
> web
> server to 'collect' data from the office server over night. We cannot get
> the two to connect.
> We have an ASP file on our web server with following code:
> <%
> Dim connL
> Set connL = Server.CreateObject("ADODB.Connection")
> connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
> Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
> address;Network Library=DBMSSOCN"
> %>
> When we run this page we get the error message:
> [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
> Please help.
> Regards
> Andrew Ellinas
>
>
|||Thank you for taking time to post such a full answer.
I will work my way through what you suggest and post what happens.
Once again, thank you.
"Andrew Ellinas" wrote:

> Hi All,
> I'm having a bit of a nightmare and could really do with some help.
> Our office server is running SQL 2005 Express.
> We have installed SQL 2005 Express in our remote web server. I want the web
> server to 'collect' data from the office server over night. We cannot get
> the two to connect.
> We have an ASP file on our web server with following code:
> <%
> Dim connL
> Set connL = Server.CreateObject("ADODB.Connection")
> connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
> Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
> address;Network Library=DBMSSOCN"
> %>
> When we run this page we get the error message:
> [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
> Please help.
> Regards
> Andrew Ellinas
>
>

No comments:

Post a Comment