Background Image

FORUM

조회 수 60879 추천 수 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 Views136
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4477
    read more
  3. 전자정부 프레임워크 트랜잭션 관련 질문드립니다.

    Date2013.08.23 By상초 Views32727
    Read More
  4. DWMAPI.dll 관련 오류

    Date2009.02.04 ByGGG특별대원 Views33285
    Read More
  5. 프로세스 정상동작 문의 드립니다.

    Date2009.01.23 By윤희서 Views33636
    Read More
  6. php - cubird 연결 부분 오류 문제 문의 드립니다.

    Date2011.05.19 By김우람 Views34354
    Read More
  7. php게시판에 있는 php설치 글에서.<? phpinfo.php ?>사용이 가능한 구문인가요?

    Date2010.01.26 By뚱기 Views34607
    Read More
  8. Mybatis로 Blob insert 문제

    Date2013.07.25 Byemiatej9 Views34641
    Read More
  9. TIMESTAMP 형 data를 insert 하는 sql문이 궁금합니다.

    Date2011.05.28 Byyongsu9 Views35060
    Read More
  10. DB / PW 자릿수를 늘려주세요.

    Date2009.01.16 By윤희서 Views35846
    Read More
  11. 큐브리드 버전 선택 문의

    Date2011.10.29 By유니콘 Views36237
    Read More
  12. 오라클의 contains()문과 비슷한 기능을 소개해주세요

    Date2009.02.17 By타이거팀 Views36307
    Read More
  13. asp.net 의 oledb 연동

    Date2009.01.04 Bywebdoors Views38313
    Read More
  14. ERD 보통 어떻게 작업하나요?

    Date2011.05.04 By차오이 Views38529
    Read More
  15. ADO.NET 드라이버 집합형 데이터 지원

    Date2012.02.09 By소라게 Views39855
    Read More
  16. cubrid install 후 생성되는 demodb 정보에관해

    Date2012.02.08 By강서꽃미남 Views40992
    Read More
  17. Cubrid 2008 srpm 공개 여부?

    Date2008.12.04 By김정균 Views41384
    Read More
  18. 64BIT 설치시 오류

    Date2008.12.26 By씩~~ Views41558
    Read More
  19. 전송 연결 현재 연결은 원격 호스트에 의해 강제로 끊겼습니다에서 데이터를 읽을 수 없습니다.

    Date2013.03.29 By바람바람 Views42892
    Read More
  20. 전자정부표준프레임워크 BLOB insert질문합니다

    Date2013.10.24 Bypoooh Views47438
    Read More
  21. 말도 안되는 Exception이 발생하는데 대체 뭘까요;;

    Date2011.11.18 By안지민 Views48217
    Read More
  22. ERROR CODE = -41, ERROR CODE = -52

    Date2013.02.07 By까망이 Views48601
    Read More
Board Pagination Prev 1 ... 192 193 194 195 196 197 198 199 200 201 Next
/ 201

Contact Cubrid

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