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. 프로세스 정상동작 문의 드립니다.

    Date2009.01.23 By윤희서 Views33635
    Read More
  4. 우분투에서 php + 큐브리드를 설치하고 있습니다.

    Date2009.01.25 By희야 Views21335
    Read More
  5. 우분투서버에서 php모듈 설치때

    Date2009.01.28 ByNoisyWalker Views14214
    Read More
  6. 혹시 MMDB 지원하나요?

    Date2009.01.31 Bytekkal Views17480
    Read More
  7. Clob Type.

    Date2009.01.31 Bytekkal Views18586
    Read More
  8. PHP 에서 cubrid_connect 실패.

    Date2009.02.03 By별의목소리 Views14381
    Read More
  9. solaris와 hp-unix 지원 관련

    Date2009.02.03 Bytekkal Views16023
    Read More
  10. C/C++ 지원하는 Connection Pool API 는 없나요?

    Date2009.02.03 Bytekkal Views21009
    Read More
  11. DWMAPI.dll 관련 오류

    Date2009.02.04 ByGGG특별대원 Views33285
    Read More
  12. OLEDB insert관련 질문입니다.

    Date2009.02.05 Bygarfield39 Views16334
    Read More
  13. cubrid manager에서 DB 권한

    Date2009.02.07 By2~40자? 2~40byte? Views13883
    Read More
  14. [replication] 성능에 대한 질문입니다.

    Date2009.02.10 Bykkckc Views16669
    Read More
  15. [질문]큐브리드 설치관련입니다.

    Date2009.02.12 By야매코더 Views13516
    Read More
  16. cubrid 2008 windows버전에서의 CUBRID_Service_Tray 실행오류

    Date2009.02.12 By마비토 Views14156
    Read More
  17. 프로그램 개발 후 배포 관련

    Date2009.02.12 By늘푸른거북이 Views25365
    Read More
  18. OLEDB 연결 시 에러 발생

    Date2009.02.12 By늘푸른거북이 Views22252
    Read More
  19. 큐브리드 메니져로 쿼리 결과 조회시

    Date2009.02.13 ByApiClasser Views13544
    Read More
  20. VB ADO 사용 관련 문의를 드립니다.

    Date2009.02.13 By늘푸른거북이 Views17377
    Read More
  21. [질문]재설치 실패...

    Date2009.02.13 By야매코더 Views12779
    Read More
  22. 큐브리드 메니져로 쿼리 결과 조회시#2

    Date2009.02.14 ByApiClasser Views12852
    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