기본 콘텐츠로 건너뛰기

ASP DB 커넥션 ( ASP GetConnection )


Public Function GetConnection(ByVal dbName)

if dbName = "" then dbName = "MALLDB"
Dim Cnn
Set Cnn = CreateObject("ADODB.Connection")
With Cnn
.Provider = "SQLNCLI10"
.Properties("Data Source").Value = "TCP:XXX.XXX.XX.X1"    'DB 서버
.Properties("Initial Catalog").Value = dbName  ' 데이터베이스명
.Properties("User ID").Value = "USERID"        '
.Properties("Password").Value = "PASSWORD"  
.Properties("Failover Partner").Value = "TCP:XXX.XXX.XX.X2"    'Mirror 서버
.ConnectionTimeout = 60
.Open
End With
Set GetConnection = Cnn
Set Cnn = Nothing
End Function

댓글

이 블로그의 인기 게시물

div 양분하기 (Two Column Layout)

float:left를 활용한 div 둘로 나누기 [html]     <div class="content_wrap">            <div class="content-list">List</div>            <div class="content-view">View</div>      </div> [css] .content_wrap {     position:relative;     width:100%; } .content-list {     width: 40%;     height:500px;     float:left;     background-color:yellow } .content-view {     width: 60%;     height: 500px;     float: left;     background-color: beige }