all groups > sql server connect > august 2004 >
You're in the

sql server connect

group:

DSN-less connection to SQL Server with sql 7 and sql 2k


DSN-less connection to SQL Server with sql 7 and sql 2k c9groups NO[at]SPAM elvis.com
8/15/2004 12:37:54 PM
sql server connect:
Hi,

I have commercial asp webspace hosting an application that connects to
an SQL machine on my local network. THe machine has both SQL 7 and SQL
2k running on it. Webspace and SQL are both running on Win2k.

The connection string I am using is as follows:

Application("Application_ConnectionString") = "Provider=sqloledb;" & _
"Network Library=DBMSSOCN;" & _
"Data Source=aaa.bbb.ccc.ddd,1433;" & _
"Initial Catalog=DBName;" & _
"User ID=xxx;" & _
"Password=yyy;"

It works fine when pointing to a database in the sql 7 instance. But
what I want to achieve is to connect to a database in the sql 2k
instance. Running locally, I can achieve this by substituting
aaa.bbb.ccc.ddd\servername_sql2k. But I cannot get it to connect to
the sql 2k instance from the commercial webspace. I get the following
message in this case:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBMSSOCN]General network error. Check your network documentation.

SO, my question is, how do you address a database in the sql 2k
instance via a dsn-less connection? Do you have to set SQL 7 and SQL
2k to listen on different ports? I have tried this but have not met
with success.

Any help gratefully received....

RE: DSN-less connection to SQL Server with sql 7 and sql 2k rboyd NO[at]SPAM onlinemicrosoft.com
8/16/2004 3:25:13 PM
Can you make a connection from a DSN from the commercial webspace using
aaa.bbb.ccc.ddd\servername_sql2k as the server name?

Also can you connect via Query Analyzer form the commercial webspace using
that servername?

Rand
This posting is provided "as is" with no warranties and confers no rights.
Re: DSN-less connection to SQL Server with sql 7 and sql 2k c9groups NO[at]SPAM elvis.com
8/18/2004 1:18:06 AM
Hi Rand

Thanks for your reply. Restricted access to the commercial web space
means that I DSN cannot be established, hence the DSN less connection.
For that reason I cannot try your suggestion of connecting Query
Analyser from that server. However, I have ascertained that both
instances of SQL Server can be reached from an external server by
connecting from a server where where I do have SQL and OS level
access.


[quoted text, click to view]
AddThis Social Bookmark Button