Background Image

FORUM

조회 수 60878 추천 수 0 댓글 2
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
큐브리드 도움말에서 asp 페이지는 아래와 같은 코드가 제공이 되는데요.
.Net aspx는 db를 유연하게(레코드별로) 제어하기 위해서 어떤 코드를 어떻게 사용할 수 있는지  아시는대로 부탁 드리겠습니다
<%
    ' DSN과 SQL문을 가져온다.
    strIP = Request( "server_ip" )
    strPort = Request( "cas_port" )
    strUser = Request( "db_user" )
    strPass = Request( "db_pass" )
    strName = Request( "db_name" )
    strQuery = Request( "query" )
  
if strIP = "" then
   Response.Write "SERVER_IP를 입력하세요"
        Response.End ' IP가 없으면 페이지 종료
    end if
    if strPort = "" then
       Response.Write "Port 번호를 입력하세요"
        Response.End ' Port가 없으면 페이지 종료
    end if
    if strUser = "" then
       Response.Write "DB_USER를 입력하세요"
        Response.End ' DB_User가 없으면 페이지 종료
    end if
    if strName = "" then
       Response.Write "DB_NAME을 입력하세요"
        Response.End ' DB_NAME이 없으면 페이지 종료
    end if
    if strQuery = "" then
       Response.Write "확인하고자 하는 Query를 입력하세요"
        Response.End ' Query가 없으면 페이지 종료
    end if
 ' 연결 객체 생성
  strDsn = "driver={CUBRID Driver};server=" & strIP & ";port=" & strPort & ";uid=" & strUser & ";pwd=" & strPass & ";db_name=" & strName & ";"
' DB연결
Set DBConn = Server.CreateObject("ADODB.Connection")
       DBConn.Open strDsn
    ' SQL 실행
    Set rs = DBConn.Execute( strQuery )
    ' SQL문에 따라 메시지 보이기
    if InStr(Ucase(strQuery),"INSERT")>0 then
        Response.Write "레코드가 추가되었습니다."
        Response.End
    end if
      
    if InStr(Ucase(strQuery),"DELETE")>0  then
        Response.Write "레코드가 삭제되었습니다."
        Response.End
    end if
      
    if InStr(Ucase(strQuery),"UPDATE")>0  then
        Response.Write "레코드가 수정되었습니다."
        Response.End
    end if  
%>
<table>
<%  
    ' 필드 이름 보여주기
    Response.Write "<tr bgColor=#f3f3f3>"
    For index =0 to ( rs.fields.count-1 )
        Response.Write "<td><b>" & rs.fields(index).name & "</b></td>"
    Next
    Response.Write "</tr>"
    ' 필드 값 보여주기
    Do While Not rs.EOF
        Response.Write "<tr bgColor=#f3f3f3>"
        For index =0 to ( rs.fields.count-1 )
            Response.Write "<td>" & rs(index) & "</td>"
        Next
        Response.Write "</tr>"
             
        rs.MoveNext
    Loop
%>
<%
    set  rs = nothing
%>
  • ?
    flypig 2008.11.25 10:01
    큐브리드는 아시겠지만 현재 .net provider가 제공되지 않고 있습니다.
    따라서 .net에서 사용하시기 위해서는 ODBC나 OLEDB를 이용하셔야 됩니다.
    aspx에서도 ADODB객체를 이용하시면 될 것으로 보입니다.
    관련하여 .net aspx의 간단한 코드를 만들어서 기술 문서로 등록하도록 하겠습니다.
    사용에 불편을 드려서 죄송합니다.
  • ?
    우페 2008.11.25 20:02
    감사합니다. 꾸벅(_ _)

  1. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4443
    read more
  2. tomcat7 + cubrid

    Date2012.07.27 By깽즈야 Views91019
    Read More
  3. 원격접속이 안되네요?????????

    Date2013.07.23 ByChris Views89530
    Read More
  4. 현재 연결은 원격 호스트에 의해 강제로 끊겼습니다

    Date2013.05.29 By바람바람 Views84888
    Read More
  5. CUBRID 7.3 + zeroboard XE 관리자 로그인 에러

    Date2009.01.17 By윤희서 Views83642
    Read More
  6. cub_master: Cannot bind local address... aborting.... Address already in use

    Date2008.11.28 By박상현 Views83564
    Read More
  7. 큐브리드 다운로더 오류 발생

    Date2008.11.22 By차오이 Views78485
    Read More
  8. zeroboard XE 설치시 'database connect fail' error

    Date2009.01.16 By윤희서 Views78164
    Read More
  9. Image 데이터타입 사용방법

    Date2008.11.25 ByAD Views73850
    Read More
  10. clob 문의

    Date2012.11.29 By김해영 Views73008
    Read More
  11. linux server 환경에서 php 버전은 어떤걸로 선택해야하는지.

    Date2008.11.30 By거기 Views66366
    Read More
  12. 델파이에서는 어떻게 사용할수 있을까요?

    Date2008.11.29 By이상원 Views65567
    Read More
  13. if exists 조건 처리문?

    Date2013.03.06 By콩이아부지 Views63606
    Read More
  14. update 쿼리를 이용한 시리얼 수정에 관하여

    Date2008.11.27 By인경수 Views63453
    Read More
  15. 큐브리드 2008 설치시 윈도우 서비스에 등록되지 않습니다.

    Date2008.11.22 By진이 Views63170
    Read More
  16. CUBRID 7.3 + zeroboard XE 관리자 로그인 에러

    Date2009.01.17 By윤희서 Views62130
    Read More
  17. 큐브리드 maven repository 관련 문의

    Date2013.04.30 ByStoneHouse Views61468
    Read More
  18. 메니저에서 접속 안되는 오류

    Date2013.08.16 By유나인 Views61067
    Read More
  19. .NET DB 제어를 위한 방법.

    Date2008.11.23 By우페 Views60878
    Read More
  20. JDK가 두개 설치된 경우 선택적으로 JDK를 설정 할 수 있는 방법은 없는지요

    Date2008.11.28 ByGoFly Views60615
    Read More
  21. 데이터 이관시 소유자 변경 가능한가요???

    Date2013.08.08 By델몬트 Views60066
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 200 Next
/ 200

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales