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 Views4442
    read more
  2. 큐브리드 다운로더 오류 발생

    Date2008.11.22 By차오이 Views78483
    Read More
  3. 큐브리드 2008 설치시 윈도우 서비스에 등록되지 않습니다.

    Date2008.11.22 By진이 Views63170
    Read More
  4. .NET DB 제어를 위한 방법.

    Date2008.11.23 By우페 Views60878
    Read More
  5. Image 데이터타입 사용방법

    Date2008.11.25 ByAD Views73850
    Read More
  6. windows CUBRID PHP module

    Date2008.11.25 By우페 Views51099
    Read More
  7. 이전버전 제거시 오류

    Date2008.11.26 Bydoplee Views53102
    Read More
  8. update 쿼리를 이용한 시리얼 수정에 관하여

    Date2008.11.27 By인경수 Views63453
    Read More
  9. cub_master: Cannot bind local address... aborting.... Address already in use

    Date2008.11.28 By박상현 Views83563
    Read More
  10. JDK가 두개 설치된 경우 선택적으로 JDK를 설정 할 수 있는 방법은 없는지요

    Date2008.11.28 ByGoFly Views60614
    Read More
  11. 더 정확히 하자면 서버실행은 되지만 Manager가 실행이;;;;

    Date2008.11.28 ByGoFly Views49420
    Read More
  12. 델파이에서는 어떻게 사용할수 있을까요?

    Date2008.11.29 By이상원 Views65566
    Read More
  13. linux server 환경에서 php 버전은 어떤걸로 선택해야하는지.

    Date2008.11.30 By거기 Views66366
    Read More
  14. 안녕하세요 김범준님..

    Date2008.12.01 ByGoFly Views30837
    Read More
  15. 시간표현 문제

    Date2008.12.02 Byasteroid Views30265
    Read More
  16. Cubrid 2008 srpm 공개 여부?

    Date2008.12.04 By김정균 Views41384
    Read More
  17. CUBRID 설치 문의 입니다.

    Date2008.12.04 By해바라기 Views27379
    Read More
  18. DB 서버 자동 실행 문의.

    Date2008.12.04 By우페 Views30520
    Read More
  19. 2008 RC1.1 매니저 실행에 대한 문제점과 임시적인 해결책

    Date2008.12.05 ByGGG특별대원 Views27220
    Read More
  20. csql 유틸리티에서 쿼리플랜 확인

    Date2008.12.05 Byasteroid Views28258
    Read More
  21. 설치관련 다시 질문 올립니다.

    Date2008.12.05 By해바라기 Views17858
    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