Background Image

FORUM

조회 수 22252 추천 수 0 댓글 4
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
개발은 Visual Basic 6.0 으로 하고 있습니다

        aAdoCn.ConnectionString = "Provider = CUBRIDProvider;" & _
                                      "Data Source = " & aDataSource & ";" & _
                                      "Location = " & aIp & ";" & _
                                      "User ID = " & aUseID & ";" & _
                                      "Password = " & aPassword & ";" & _
                                      "Port = 30000;" & _
                                      "Fetch Size = 100"

다음과 같이 연결을 하고
ADO를 이용하여 조회를 하고 있는데
adors.Recordcount
adors.MoveNext 등 의 함수를 이용하면

데이터 공급자나 기타 서비스가 E_FAIL 상태를 반환했습니다 라고  에러가 발생합니다.


참고로 
            aAdoCn.ConnectionString = "driver={CUBRID Driver};" & _
                                      "server=" & aIp & ";" & _
                                       "port=33000;" & _
                                      "uid=" & aUseID & ";" & _
                                      "pwd=" & aPassword & ";" & _
                                     "db_name=" & aDataSource & ";"
이런 식으로 연결하면 정상적으로 실행이 됩니다.
  • ?
    손승일 2009.02.12 19:56
    recordset의 CursorLocation 속성의 값을 AdUseClient로 설정해보시기 바랍니다.
  • ?
    늘푸른거북이 2009.02.13 18:05
    답변 감사합니다
    CursorLocation 속성을 AdUseClient로 변경을 하였는데도 같은 에러가 발생을 하네요.
    혹시 제가 더 확인해 봐야 하는 부분이 있을까요?
  • ?
    늘푸른거북이 2009.02.13 18:05
    답변 감사합니다
    CursorLocation 속성을 AdUseClient로 변경을 하였는데도 같은 에러가 발생을 하네요.
    혹시 제가 더 확인해 봐야 하는 부분이 있을까요?
  • ?
    flypig 2009.02.12 20:36

    아래 테스트 코드를 작성하여 시험한 결과 문제 없이 작동을 하였습니다.
    기본적으로 OLEDB의 cursor location은 Server에 만들어지고 이때에 recordset의 count는 사용할 수 없습니다.
    recordset.recordcount를 사용하기 위해서는 cursor location을 클라이언트로 하고 질의를 수행해야 합니다.
    아래 코드를 참조하시기 바랍니다.
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Private Sub Command1_Click()
        Dim adoConn As ADODB.Connection
        Dim adoRset As ADODB.Recordset
        Dim strConn As String
        Dim strSQL As String
       
        strConn = ""
       
        'make OLEDB connection string
        strConn = strConn & "Provider = CUBRIDProvider;"
        strConn = strConn & "Data Source = db_name;" ' database name
        strConn = strConn & "Location = server_ip;"  ' database server ip address
        strConn = strConn & "User ID = user_id;"     ' database user id
        strConn = strConn & "Password = user_passwd;" ' database user id's password
        strConn = strConn & "Port = 33000;"          ' broker port
        strConn = strConn & "Fetch Size = 100;"

        ' connect to database with ado connection object
        Set adoConn = New ADODB.Connection
        With adoConn
            .ConnectionString = strConn
            .ConnectionTimeout = 30
            .Properties("Prompt") = adPromptNever
            .CursorLocation = adUseClient ' default valuse is adUseServer
            .Open
        End With
       
        ' create SQL statement and run the SQL
        strSQL = " select client_id, client_name from css_client where rownum < 101 "
       
        Set adoRset = adoConn.Execute(strSQL, , adCmdText)
       
        If adoRset.EOF Then
            MsgBox "No data found...", vbInformation + vbOKOnly, "Notify"
           
            If Not adoRset Is Nothing Then
                adoRset.Close
                Set adoRset = Nothing
            End If
            Exit Sub
        End If
        ' display select record count
        MsgBox adoRset.RecordCount, vbInformation + vbOKOnly, "notify"
       
        ' display data on spread sheet
        With vaSpread1
       
            While Not adoRset.EOF
                .MaxRows = .MaxRows + 1
                .Row = .MaxRows
               
                .Col = 1
                .Text = adoRset(0)
               
                .Col = 2
                .Text = adoRset(1)
               
                adoRset.MoveNext
            Wend
        End With
       
    End Sub


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

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

    Date2020.04.09 Byadmin Views4458
    read more
  3. OleDbCommand 를 사용하는데 다음 같은 에러가 발생합니다.

    Date2008.12.10 Byhades Views22366
    Read More
  4. 서브쿼리에서 두개 이상의 데이터를 참조하려면.

    Date2009.03.03 By안지민 Views22320
    Read More
  5. OLEDB 연결 시 에러 발생

    Date2009.02.12 By늘푸른거북이 Views22252
    Read More
  6. cubrid bigint를 java로 가져오는데 문제가 있네요...

    Date2011.01.04 By반짝이 Views22139
    Read More
  7. JDBC ResultSet에 대한 문의

    Date2010.01.15 By강우 Views22135
    Read More
  8. 큐브리드는 mysql 의 varchar(255) 와 동일한 길이가 아니네요?

    Date2009.12.28 By초보 Views22102
    Read More
  9. 테이블목록과 필드목록을 조회하는 방법

    Date2016.11.21 By박경채 Views22081
    Read More
  10. 컴이 느려집니다.

    Date2013.02.10 By또랑 Views22067
    Read More
  11. 64 bit 포팅이란?

    Date2009.03.31 By초보대왕 Views22003
    Read More
  12. 쿼리 질의시 소수점 자리 수 처리 관련

    Date2014.02.14 Bydashbell Views21997
    Read More
  13. 데이터베이스 자동시작 설정 메뉴

    Date2009.01.19 By윤희서 Views21976
    Read More
  14. TO_CHAR 관련 질문입니다.

    Date2010.10.18 By노스 Views21947
    Read More
  15. 오류 좀 확인해주세요ㅜㅜ

    Date2009.12.04 By푸른잔디 Views21923
    Read More
  16. redhat 에서 cubrid 설치방법 문의

    Date2009.10.27 By레드코레아 Views21909
    Read More
  17. cubrid php module이 linux 32bit 에서는 컴파일이 안됩니다.

    Date2008.12.18 By들뿔 Views21847
    Read More
  18. Stored procedure execute error: 자바 저장프로시저 관련오류입니다.

    Date2011.11.01 Bywolf Views21799
    Read More
  19. 설치 및 삭제의 편의성 증대 요청

    Date2009.01.20 By윤희서 Views21699
    Read More
  20. 델파이 ADOStoredProcedure 컴포넌트에서 큐브리드저장함수의 리턴값을 받고싶습니다.

    Date2011.11.03 Bywolf Views21626
    Read More
  21. 4.0 beta CUBRID HA관련 문제...

    Date2011.05.18 By반짝이 Views21610
    Read More
  22. 게시판의 이전글 다음글 구현 쿼리질문

    Date2009.05.29 By김형일 Views21597
    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