2009. 2. 3. 15:40

DB 에서 값 불러와 페이지 보이기.


<%
 Option Explicit

 Dim strConnect, sql
 Dim Rs

 strConnect = "Provider=SQLOLEDB.1;Data Source=192.168.1.92;Initial Catalog=Show;User ID=show;Password=password"
 Set Rs = Server.CreateObject("ADODB.RecordSet")

 SQL = "select coll_2 from check where coll_id = '3'"
 Rs.Open SQL, strConnect

' Rs.Find "price <10"

 If Rs.Eof Then
  Response.Write "데이터 베이스가 93 서버로 FailOver 되었습니다. 관리자에게 연락 바랍니다."
 Else
  Response.Write " " & Rs(0) & "<br>"
'  Rssponse.Write "가격 : " & rs(1) & "<p>"
 End If
 
 Rs.Close
 Set Rs = Nothing
%>