Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connection string

Status
Not open for further replies.

JKingdom

Programmer
May 9, 2004
141
AE
am using the connection bellow to connect my asp pages to the sql server localy .. what if i want to connect the pages to a database on another server ??

"Driver={SQL Server};Server=Appsrv;Database=finance;Uid=;Pwd=;"

1- how to lacate the database and what user name and pass i need ?? the server's.. or the sql server's..

2- another thing is that what if i wanted to connect to the databse through the DNS .. what the connection string would be ?
 
for your question 2...the connection string would look something like this:

"DSN=dsnname;uid=youruid;pwd=xxxx"

-DNG
 
Wait was it DNS or DSN ???

I guess the former would be using the database server/instance name instead of its IP address... the latter would be configuring a named datasource on your local computer.
 
what do mean connecting to a server??

is the server local or remote....what problem are you facing...what error are you getting...what connection string did you try...

please post more details to get a specific solution...

-DNG
 
i want to connect the asp pages to a database on another server ??
 
try this:

Code:
<% dbconn="Provider=SQLOLEDB.1;UID=user;Password=password;Initial Catalog=DSNname;Data Source=IPaddressoftheSQLserver,PortNumber" 
%>

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top