Background Image

FORUM

조회 수 22247 추천 수 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. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4257
    read more
  2. 엑셀 파일 임포트시 오류

    Date2010.01.25 By초보 Views23369
    Read More
  3. java stored procedure 실행시 에러

    Date2009.12.22 Byhyperhand Views23364
    Read More
  4. Windows 에서 사일런트 설치가 가능한가요...

    Date2009.08.12 By거만쟁이 Views23354
    Read More
  5. jmeter로 테스트해보신분 계신가요

    Date2009.06.01 By삽질쟁이 Views23315
    Read More
  6. 오라클 rank() over를 대체 할 수 있는 함수가 있나요?

    Date2011.08.16 By쿠쿡 Views23268
    Read More
  7. Replication, 서버 이중화, HA

    Date2012.01.26 By승준77 Views23263
    Read More
  8. 날짜 계산관련 문의드립니다.

    Date2009.07.29 By치푸 Views23176
    Read More
  9. 8.3.1 --> 9.2 업그레이드 후 한글 깨짐. ( vb6.0 + MS949 )

    Date2013.12.28 By한종희 Views23127
    Read More
  10. error while loading shared libraries: libgtk-x11-2.0.so.0

    Date2009.04.25 By공기청정기 Views22969
    Read More
  11. 테이블 컬럼에 comment 넣기..

    Date2013.10.09 By파란토끼 Views22961
    Read More
  12. 표준프레임워크의 공통컴포넌트에 게시판설치관련

    Date2012.08.31 By큐브리 Views22757
    Read More
  13. c# 에서 개발 중인데 쿼리 처리속도가 느리네요(수정)

    Date2012.12.20 Byyak341 Views22684
    Read More
  14. JVM terminated. Exit code=13 이런 코드가 나와서 cubridmanager가 실행 안됩니다.

    Date2010.03.19 By검신81 Views22665
    Read More
  15. mssql -> cubrid 데이터 이전시 문제

    Date2010.02.25 By종이 Views22651
    Read More
  16. cubrid에 대량 데이터 insert 시 에러

    Date2009.01.15 By비니뷘 Views22624
    Read More
  17. [초보질문]function 변환 문의 (oracle -> cubrid)

    Date2009.05.08 By삽질중 Views22588
    Read More
  18. 파워빌더10.2에서 ODBC설정에 대한 문제

    Date2009.12.05 Byksk Views22573
    Read More
  19. Oracle SQL 을 Cubrid SQL 로 컨버젼 툴 문의

    Date2014.06.26 By홍가 Views22571
    Read More
  20. 큐브리드는 안드로이드 연동이 안되나요?

    Date2012.05.01 By달선생 Views22395
    Read More
  21. HA 구성 하에서 RO 브로커 연결 시 SELECT 값이 다릅니다.

    Date2012.02.24 Byfreemir Views22375
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 199 Next
/ 199

Contact Cubrid

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