Re: Connecting to a SQL Server 2005 DB on a Remote Web Server
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Tue, 11 Jul 2006 09:48:42 -0400
Mike Webb wrote:
I have an existing VB6 app. that talks to an Access MDB over a LAN
and works fine.
I want to upgrade the Access MDB to SQL Server 2005 and move it to a
remote Web Server to be used in e-commerce with ASP.NET BUT still
access the DB from the Back Office VB6 app.
So far I have not been able to connect to the SQL Server DB and have
tried many connection string combos.
1st Can this ACTUALLY be done - or should I use an alternative
architecture? 2nd If so what should the connection string look like?
This should work (you may need to turn on the tcp/ip stuff in SQL Server
.... check with a sqlserver group for details):
Connect via an IP address:
"Provider=sqloledb;Data Source=190.190.200.100,1433;Network
Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd;"
(DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source
is the port to use (1433 is the default))
If you've installed the SQL Native Client on the machine, then:
COM applications, all other then .Net applications
Use the SQL Native Client if you are accessing an SQL Server 2005 and
need the new features of SQL Server 2005 such as MARS, encryption, XML
data type etc. Continue use your current provider (OLE DB / ODBC through
the MDAC package) if you are not connecting to an SQL Server 2005
(that's quite obvious eh..) or if you are connecting to an SQL Server
2005 but are not using any of the new SQL Server 2005 features.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
.
- Prev by Date: Re: why i got "800a0bcd Either BOF or EOF is True, or the current rec
- Next by Date: Re: Connecting to a SQL Server 2005 DB on a Remote Web Server
- Previous by thread: Re: why i got "800a0bcd Either BOF or EOF is True, or the current rec
- Next by thread: Re: Connecting to a SQL Server 2005 DB on a Remote Web Server
- Index(es):
Relevant Pages
|
|