FORUM

조회 수 65049 추천 수 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. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

    Date2024.04.23 Byadmin Views131977
    read more
  2. "DATABASE 검사" 도무지 끝날 기미가 안 보입니다

    Date2011.08.02 By한종희 Views11665
    Read More
  3. "DBMS, 0, Unknown DBMS error" 요건 무슨 애러인가요?;;

    Date2011.06.02 Byeitetu Views17309
    Read More
  4. "Token length is too long" 오류에 관하여 질문 드립니다.

    Date2009.01.09 By김우람 Views24879
    Read More
  5. & 등의 특수문자등이 변환되어 저장되는 경우

    Date2012.12.28 By호랑이야옹 Views13637
    Read More
  6. ' 의 입력 방식이 궁금합니다.

    Date2009.04.10 By이석희 Views17239
    Read More
  7. 'cannot communicate with server' 에러 문의 드립니다.

    Date2025.04.18 By잘했어요 Views2637
    Read More
  8. (1개의 댓글은 작성자가 썼습니다.)비주얼 베이직 큐브리드 연동후 동시에 여러 테이블 보는 방법문의

    Date2012.12.21 By강남우 Views58
    Read More
  9. (Re:) 회원가입이 3명이상 안돼요...

    Date2010.07.08 By딩이 Views11049
    Read More
  10. (python)centOS7 docker 연결 문의입니다.

    Date2021.11.01 By리얼비 Views4250
    Read More
  11. (댓글 질문등록 했습니다.)이전글, 다음글 기능(LAG, LEAD) ORDER BY절 FOR ORDERBY_NUM() 추가해도 그대로 입니다

    Date2017.04.19 By취우다 Views8810
    Read More
  12. (윈도우 환경) 데이터베이스 외부 접속이 안됨

    Date2025.02.13 Bytndus Views10801
    Read More
  13. (함수)펑션 오류 확인부탁드립니다.

    Date2023.02.10 By초코초코초 Views4558
    Read More
  14. *variable* 에러

    Date2013.06.14 Byhwon Views15010
    Read More
  15. ++ cubrid server start: fail

    Date2013.09.13 By토네이도 Views17291
    Read More
  16. -74 오류 조치 방법

    Date2013.08.07 By덜쇠 Views11041
    Read More
  17. .AccessViolationException (C#)

    Date2021.06.03 Byswift Views4282
    Read More
  18. .NET 4.5 에서의 NHibernate 문제, .NET 4.0 에서 NHibernate + TransactionScope 활용 문제.

    Date2017.06.09 Bywebsiter Views5277
    Read More
  19. .NET DB 제어를 위한 방법.

    Date2008.11.23 By우페 Views65049
    Read More
  20. .net db목록 관련 질문 드립니다.

    Date2021.03.05 By파인 Views4151
    Read More
  21. // 를 사용하고 싶습니다.

    Date2010.02.10 By죽통군 Views13478
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 213 Next
/ 213

Contact Cubrid

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

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

나눔고딕 사이트로 가기

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5