Background Image

FORUM

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

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

ADO란 객체를 이용하여 프로그램을 작성하는데 이 객체는 ODBC나 OLEDB Driver를 이용합니다.
그런데 ADO객체는 connection이나 recordset을 만들 때 cursor의 위치를 지정할 수 있습니다.
ODBC는 server side cursor or client side cursor를 모두 지원하고 있고 잘 동작이 됩니다.

그러나 OLEDB는 client side cursor가 지원이 안되고 있습니다. ADO기본값은 server side cursor입니다.
client side cursor가 지원되지 않으면 많은 개발 툴이나 질의 툴 등에서 문제가 발생합니다.

        ' make ODBC connection string
'        strConn = strConn & "driver={CUBRID Driver};"
'        strConn = strConn & "server=" & UserInfo.ServerIP & ";"
'        strConn = strConn & "port=" & UserInfo.PortNO & ";"
'        strConn = strConn & "uid=" & UserInfo.DBUserID & ";"
'        strConn = strConn & "pwd=" & UserInfo.DBPassword & ";"
'        strConn = strConn & "db_name=" & UserInfo.DBName & ";"

        'make OLEDB connection string
        strConn = strConn & "Provider = CUBRIDProvider;"
        strConn = strConn & "Data Source =" & UserInfo.DBName & ";"
        strConn = strConn & "Location =" & UserInfo.ServerIP & ";"
        strConn = strConn & "User ID =" & UserInfo.DBUserID & ";"
        strConn = strConn & "Password =" & UserInfo.DBPassword & ";"
        strConn = strConn & "Port =" & UserInfo.PortNO & ";"
        strConn = strConn & "Fetch Size = 100;"
        strConn = strConn & "Persist Security Info = True;"

        ' connect to database with ado connection object
        Set GadoConn = New ADODB.Connection
        With GadoConn
          .ConnectionString = strConn
          .ConnectionTimeout = 30      '
          .Properties("Prompt") = adPromptNever ' 이것은 ADO에서 기본 프롬프트 모드입니다.
          .CursorLocation = adUseClient
            .Open
        End With

위의 소스에서 연결 문장을 ODBC를 이용하면 문제가 없이 잘 동작하는데 OLEDB를 이용하면 데이타를 가지고 오지
못해서 데이타 처리가 안됩니다.
내부 에러로 보입니다. 확인 부탁합니다.

  • ?
    cubebridge 2010.01.29 21:28
    현재 내부 확인 중입니다. 
    확인 후 결과를 말씀드리겠습니다.
  • ?
    seongjoon 2010.02.10 00:13

    VB6.0에서 테스트를 해보았습니다.
    제가 테스트에서 사용한 소스 코드는 아래과 같으며, 테스트 결과 odbc와 oledb 모두 정상적으로 값이 출력되었습니다.
    테스트에 사용된 CUBIRD 버젼은 최신 버젼은 CUBRID 2008 R2.1 (8.2.1.0215)입니다.

    '소스 시작
    Private Sub Command1_Click()

        Dim GadoConn As New ADODB.Connection
        Dim cmdCommand As New ADODB.Command
        Dim rstRecordSet As New ADODB.Recordset
        Dim strConn As String
       
        'strConn = strConn & "driver={CUBRID Driver};"
        'strConn = strConn & "server=localhost;"
        'strConn = strConn & "port=33000;"
        'strConn = strConn & "uid=dba;"
        'strConn = strConn & "pwd=;"
        'strConn = strConn & "db_name=demodb;"
     
        strConn = strConn & "Provider = CUBRIDProvider;"
        strConn = strConn & "Data Source = demodb;"
        strConn = strConn & "Location = localhost;"
        strConn = strConn & "User ID = dba;"
        strConn = strConn & "Password =;"
        strConn = strConn & "Port = 33000;"
        strConn = strConn & "Fetch Size = 100;"
        strConn = strConn & "Persist Security Info = True;"

        Set GadoConn = New ADODB.Connection
        With GadoConn
          .ConnectionString = strConn
          .ConnectionTimeout = 30      '
          .Properties("Prompt") = adPromptNever ' 이것은 ADO에서 기본 프롬프트 모드입니다.
          .CursorLocation = adUseClient
          .Open
        End With

        With cmdCommand
            .ActiveConnection = GadoConn
            .CommandText = "SELECT * FROM code;"
            .CommandType = adCmdText
        End With

        With rstRecordSet
            .CursorType = adOpenStatic
            .CursorLocation = adUseClient
            .LockType = adLockOptimistic
            .Open cmdCommand
        End With
       
        If Not rstRecordSet.EOF Then rstRecordSet.MoveFirst
        Do While Not rstRecordSet.EOF
            List1.AddItem rstRecordSet.Fields(0) & ", " & rstRecordSet.Fields(1)
            rstRecordSet.MoveNext
        Loop
      
        GadoConn.Close
       
        Set GadoConn = Nothing
        Set cmdCommand = Nothing
        Set rstRecordSet = Nothing
    End Sub
    '소스 끝


  1. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

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

    Date2020.04.09 Byadmin Views4458
    read more
  3. ADO.NET에서 자바 저장함수 호출

    Date2014.11.01 Bykdknim21 Views8420
    Read More
  4. ADO.Net 사용중입니다. 상태확인 방법을 알고 싶습니다.

    Date2015.10.22 ByCUCUCUCU Views5691
    Read More
  5. ADO.net Driver 변경 시 cascci.dll 로드할 수 없다는 오류

    Date2017.07.25 By물병 Views503
    Read More
  6. ADO.net 또는 ODBC에 대한 질문입니다.

    Date2012.03.20 By세스카 Views13377
    Read More
  7. ADO이용시 OLEDB Driver에러

    Date2010.01.29 Byflypig Views15619
    Read More
  8. AIX에 CUBRID 설치 후 오류사항 문의

    Date2015.06.02 By최명호 Views7735
    Read More
  9. ALTER 로 PK 여러 개 지정하고싶습니다

    Date2021.07.21 By사탕구름 Views832
    Read More
  10. ARRAY 데이터 타입에 대한 SQL 질문

    Date2010.10.08 By지용 Views10246
    Read More
  11. AUTO INCREASE 가 편집이 안됨

    Date2022.02.08 By큐브리드어려워요 Views268
    Read More
  12. AUTO_INCREMENT 수동 증가 문의

    Date2021.08.19 Bycubrid초보 Views727
    Read More
  13. AUTO_INCREMENT 컬럼 이용시

    Date2009.12.22 Byhyperhand Views17649
    Read More
  14. AVG 함수관련 질문드려요

    Date2013.06.10 By구름마음 Views13678
    Read More
  15. Ado.NET : Cannot connect to CUBRID CAS 오류

    Date2017.05.05 Bywebsiter Views57864
    Read More
  16. Ado.net. ExecuteNonQuery의 반환값이 항상 0 입니다.

    Date2019.01.08 By모비23 Views1481
    Read More
  17. An IOException was caught during reading the inputstream

    Date2015.11.26 By익명2 Views6872
    Read More
  18. An IOException was caught during reading the inputstream

    Date2015.11.26 By익명2 Views6831
    Read More
  19. An IOException was caught during reading the inputstream. 오류 조치방법 좀 알려주세요.

    Date2019.10.29 Byldev27 Views314
    Read More
  20. An internal error occurred during: "Fetching children of <DB명>". java.lang.NullPointerException 에러

    Date2021.04.06 Byysh Views481
    Read More
  21. Apm_setup7로 자동설치시 연동이 안되는데...

    Date2010.11.08 By또랑 Views8277
    Read More
  22. Archive Log만으로 타임복구가 가능한가요?

    Date2016.04.29 By핑핑크 Views9820
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 ... 200 Next
/ 200

Contact Cubrid

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