ASP Database Connection
HI Guyz
I am New in ASP. I have a Database for which the user name is "da" and password is "hellothere". I have the following code which establishes the connection with remote server. But I want to write a separate ASP file contaiting this lines so that when I change user name and password, I just need to change in that file only, not in every ASP pages. Any Help would be highly appreciated.
<%
dim Constring1
Constring1 = "Provider=SQLOLEDB;Server=139.78.185.223;Database= rddata;UID=da;PWD=hellothere;"
mysql = "SELECT DISTINCT TOP 100 PERCENT CountyName, CountyFIPS FROM dbo.tblCounties WHERE (StateFIPS = '40') ORDER BY CountyName"
Set con1 = Server.CreateObject("ADODB.Connection")
con1.Open(Constring1)
'con.Source = "SELECT * FROM dbo.tblCensus_CO_Fact"
Set RS1 = Server.CreateObject("ADODB.Recordset")
RS1.Open mysql,con1
RS1.PageSize = 10
%>
Shaikot
|