Background Image

FORUM

?

단축키

Prev이전 문서

Next다음 문서

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

* 질문 등록 시 다음의 내용을 꼭 기입하여 주세요.
OS
Window7 32bit, Linux 64bit 등
CUBRID Ver.
[cubrid_rel] 수행 결과
CUBRID TOOL Ver.
[도움말]-[버전정보] 확인
응용 환경(API)
java, php, odbc 등 입력

* CUBRID 응용 오류, SQL 오류 또는 SQL 튜닝 관련된 문의는 반드시 다음의 내용을 추가해 주세요. 비밀글이나 비밀 댓글도 가능합니다.
* 저희가 상황을 이해하고, 재현이 가능해야 알 수 있는 문제들이 많습니다. 가능한 정보/정황들을 부탁합니다.
에러 내용 및 재현 방법 재현 가능한 Source와 SQL
관련 테이블(인덱스, 키정보 포함) 정보 CUBRID 홈 디렉토리 아래 log 디렉토리 압축


-------------- 아래에 질문 사항을 기입해 주세요. ------------------------------------------------------------------------


사용 닷넷 버전은 4.0이고


큐브리드 버전은 9.3입니다


드라이버는 ADO.NET Driver - CUBRID 9.3 를 다운받아 CUBRID.Data.dll 파일을 /Bin 폴더에 추가하여 테스트했습니다.




## 테스트 코드 1 ##


string CONN_STR = "server=xxx.xxx.xxx.xxx;database=xxxx;port=33000;user=xxxx;password=xxxx;charset=utf-8";


string sql = "select * from user";


CUBRIDConnection conn = new CUBRIDConnection(CONN_STR);

conn.Open();


        CUBRIDDataAdapter da = new CUBRIDDataAdapter();

        da.SelectCommand = new CUBRIDCommand(sql, conn);


        DataTable dt = new DataTable();

        da.Fill(dt);


        return dt;



@ 오류 내용 1

da.Fill(dt); -> DataReader.GetFieldType(0)에서 null을 반환했습니다.





## 테스트 코드 2 ##


string CONN_STR = "server=xxx.xxx.xxx.xxx;database=xxxx;port=33000;user=xxxx;password=xxxx;charset=utf-8";


string sql = "select * from user";

CUBRIDConnection conn = new CUBRIDConnection(CONN_STR);

conn.Open();


        using (CUBRIDCommand cmd = new CUBRIDCommand(sql, conn))

        {

            CUBRIDDataReader reader = (CUBRIDDataReader)cmd.ExecuteReader();

            reader.Read();


            DataTable dt = new DataTable();

            dt.Load(reader);


            return dt;

        }



@ 오류 내용 2

reader.Read(); -> 문자열 참조가 문자열의 인스턴스로 설정되지 않았습니다. 매개 변수 이름: s





## 테스트 코드 3 ##


string CONN_STR = "server=xxx.xxx.xxx.xxx;database=xxxx;port=33000;user=xxxx;password=xxxx;charset=utf-8";


string sql = "select * from user";

CUBRIDConnection conn = new CUBRIDConnection(CONN_STR);

conn.Open();


        using (CUBRIDCommand cmd = new CUBRIDCommand(sql, conn))

        {

            using (DbDataReader reader = cmd.ExecuteReader())

            {

                reader.Read();

                //(read the values using: reader.Get...() methods)


                DataTable dt = new DataTable();

                dt.Load(reader);


                return dt;

            }

        }


@ 오류 내용 3

reader.Read(); -> 문자열 참조가 문자열의 인스턴스로 설정되지 않았습니다. 매개 변수 이름: s





## 테스트 코드 4 ##


string CONN_STR = "server=xxx.xxx.xxx.xxx;database=xxxx;port=33000;user=xxxx;password=xxxx;charset=utf-8";


string sql = "select * from user";

CUBRIDConnection conn = new CUBRIDConnection(CONN_STR);

conn.Open();


        using (CUBRIDDataAdapter da = new CUBRIDDataAdapter(sql, conn))

        {

            using (CUBRIDDataAdapter daCmd = new CUBRIDDataAdapter(sql, conn))

            {

                CUBRIDCommandBuilder cmdBuilder = new CUBRIDCommandBuilder(daCmd);

                da.InsertCommand = cmdBuilder.GetInsertCommand();

            }


            DataTable dt = new DataTable();

            da.Fill(dt);


            return dt;

            //DataRow newRow = dt.NewRow();


            //newRow"code" = "ZZZ";

            //newRow"name" = "ABCDEF";

            //newRow"capital" = "MyXYZ";

            //newRow"continent" = "QWERTY";


            //dt.Rows.Add(newRow);

            //da.Update(dt);

        }



@ 오류 내용 4

da.InsertCommand = cmdBuilder.GetInsertCommand(); -> 여러 기본 테이블에 대해서는 동적 SQL 생성이 지원되지 않습니다.





인터넷 뒤져가며 테스트 해봤는데 동작이 안되네요


뭔가 드라이버나 버전 문제인거 같은데


제가 잘못한게 무엇인지 확인좀 부탁드려요






  • ?
    오명환 2018.07.02 14:06
    cubrid-adonet 프로젝트 안에 있는 test code를 참조해주세요.

    https://github.com/CUBRID/cubrid-adonet/tree/develop/Code/Test/QATest/ADOTest
  • ?
    김병욱 2018.07.02 15:23
    CUBRID ADO.net 버전을 아래의 ftp에서 받으셨다면, 아마도 CUBRID ADO.NET Data Provider 9.3.0.0003.zip을 받으신 것 같습니다.
    (http://ftp.cubrid.org/CUBRID_Drivers/ADO.NET_Driver/9.3.0)

    CUBRID ADO.Net 9.3.0003은 CUBRID 서버 10.0 이후 버전과 호환이 됩니다.
    CUBRID 서버 9.3과 호환되는 버전은 CUBRID ADO.NET Data Provider 9.3.0.0001.zip이나 CUBRID ADO.NET Data Provider 9.3.0.0002.zip입니다.

    위에 설명드린 버전을 다운 받으셔서 다시 시험해 보시기 바랍니다.
  • ?
    제무다 2018.07.05 01:24
    9.3.0.0002 드라이버는 똑같은 에러가 발생하고 9.3.0.0001 드라이버로 하니까 정상 동작하네요~ 감사합니다!

List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 CUBRID 사용자를 위한 DBeaver 도구 출시 안내 admin 2024.04.23 43
공지 SQLGate for CUBRID 영구 무료 라이선스 제공 file admin 2020.04.09 4458
3434 php 7.3 + Cubrid 8.4.4 연동 문제 1 땡땡이 2021.06.08 86
3433 파라미터 바인드 문제.. 2 오션나인 2021.06.04 261
3432 .AccessViolationException (C#) 1 swift 2021.06.03 220
3431 큐브리드 커맨드 내 spool과 set echo 의 사용가능 여부 1 솨솨솨 2021.06.01 1991
3430 에러가 왜 날까요... 잘 입력 되다가 이런 에러가 나네요.. 파이선 사용자입니다. 4 오션나인 2021.05.27 907
3429 큐브리드에서 오프소스 Talend 사용 가능한 지 문의드립니다. 3 본부장 2021.05.24 184
3428 CUBRID 매니저에서 뷰 편집 -> SQL문 보기시 SQL이 너무 길어 짤리는 현상 4 테크 2021.05.24 290
3427 Failed on handshake between client and server 에러가 계속 발생 합니다.. 3 file dwpark 2021.05.18 181
3426 가장 어을리는 cubrid version 1 정글의 왕자 2021.05.18 130
3425 생성 스크립트에 대한 트리거 순서에 대하여 질문 드립니다. 5 제로미 2021.05.17 204
3424 HA 구성 후에 HA-Node Info 에 state ip_addr_mismatch 가 출력됩니다. 1 나래 2021.05.17 146
3423 Cubrid 데이터베이스 생성 시 오류 확인 요청 3 file 딤디딤 2021.05.14 165
3422 큐브리드 cannot connect to a broker 3 솨솨솨 2021.05.14 1235
3421 공급자는 로컬 컴퓨터에 등록할 수 없습니다 에러메세지 2 file swift 2021.05.14 242
3420 큐브리드 데이터베이스 복구 관련 질문 5 ots21 2021.05.14 296
3419 테이블 생성 시 질의 오류 6 ots21 2021.05.12 218
3418 큐브리드 DB이전 1 먹고래 2021.05.11 185
3417 putty 터미널로 unloaddb 진행 관련 문의 10 file 솨솨솨 2021.05.07 253
3416 utf8mb4 지원되나요??? 1 덴드로비움 2021.05.06 225
3415 autoexecquery.conf 파일 수정문의 1 대청 2021.04.29 133
Board Pagination Prev 1 ... 24 25 26 27 28 29 30 31 32 33 ... 200 Next
/ 200

Contact Cubrid

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