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. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

    Date2024.04.23 Byadmin Views43
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4458
    read more
  3. java vm is not running

    Date2010.04.03 Byyoon Views15858
    Read More
  4. 매니저에서 테이블 여러개를 한꺼번에 삭제 하려면?

    Date2010.04.02 By초보 Views10836
    Read More
  5. group by 오류

    Date2010.03.31 By초보 Views10444
    Read More
  6. mysql 데이트 컬럼 자르기 문의

    Date2010.03.31 By초보 Views16213
    Read More
  7. 데이트타입 컬럼의 주를 구하는 함수는?

    Date2010.03.31 By초보 Views11081
    Read More
  8. 데이터베이스 백업 문의

    Date2010.03.31 By닉네임2 Views9137
    Read More
  9. 저장프로시저(function) 오류 문제입니다.

    Date2010.03.29 Byyoon Views10732
    Read More
  10. jdbc 관련 질문입니다. 톰켓 종료시 문제입니다.

    Date2010.03.25 By노스 Views14411
    Read More
  11. 쿼리 오류 질문 입니다.

    Date2010.03.24 By초보 Views13830
    Read More
  12. 디비 사용자 추가시 오류 문의드립니다.

    Date2010.03.24 By큐브초보 Views9984
    Read More
  13. DB 생성 오류 질문입니다.

    Date2010.03.24 By노스 Views12492
    Read More
  14. 날짜함수 문의

    Date2010.03.24 By초보 Views12921
    Read More
  15. 엔터 개행문자 역슬래쉬 문제

    Date2010.03.24 By초보 Views26550
    Read More
  16. grails에서 사용이 가능한 방법이 있나요?

    Date2010.03.23 Bynsky13 Views13680
    Read More
  17. 마이그레이션 툴문의

    Date2010.03.23 Bywebdoors Views10497
    Read More
  18. cast 연산쿼리 성능 질문드립니다~

    Date2010.03.22 By파란시인 Views12687
    Read More
  19. JVM terminated. Exit code=13 이런 코드가 나와서 cubridmanager가 실행 안됩니다.

    Date2010.03.19 By검신81 Views22673
    Read More
  20. cubridmanager 의 호스트 목록이 가끔 사라집니다.

    Date2010.03.19 By하야로비 Views9975
    Read More
  21. mysql 쿼리 변환 질문 입니다.

    Date2010.03.16 By초보 Views12201
    Read More
  22. 오라클과 큐브리드중 어느걸 도입해야하는지 고민중입니다.

    Date2010.03.16 By신의손 Views10475
    Read More
Board Pagination Prev 1 ... 166 167 168 169 170 171 172 173 174 175 ... 200 Next
/ 200

Contact Cubrid

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