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 도구 출시 안내 update admin 2024.04.23 21
공지 SQLGate for CUBRID 영구 무료 라이선스 제공 file admin 2020.04.09 4452
3931 SQL 행, 10분이상 지연 시 해제 및 설정 방법 문의 드립니다 2 kdman 2023.12.06 107
3930 에러코드 -51 질문드립니다. 1 kkkkwwakji 2023.12.01 110
3929 오류 메세지 문의 Derived column names are not allowed for simple class specifications. 4 달이맘 2023.12.01 125
3928 큐브리드 매니져 접속오류문의 드립니다. 3 file 원샷 2023.11.30 141
3927 query 최대 실행 줄 수 가 어떻게 되나요?? 3 file kjn4345 2023.11.24 153
3926 같은 그룹에 속한 OS계정에서의 csql접속 3 f0081 2023.11.22 109
3925 비슷한 조건의 환경에서 select 질의시 오류가 발생합니다. 1 msbb8585 2023.11.21 104
3924 임시볼륨 늘어나는 문제 1 angdoo 2023.11.21 96
3923 DB 데이터 이전 관련 3 별린 2023.11.20 120
3922 Java Maven Repository 2 내멋으로 2023.11.16 121
3921 Cubrid의 Window 버전의 Broker Port 구성 방식 2 jhlee 2023.11.15 101
3920 [CUBRID Admin] ENUM 데이터 내보내기 1 tree1891 2023.11.14 109
3919 CUBRIDException: Data type references are incompatible. 에러관련 쿼리질문 15 file yhpark 2023.11.14 218
3918 사용자 삭제 시 소유한 오브젝트를 함께 삭제하는 방법 1 f0081 2023.11.14 135
3917 unloaddb 에러 확인 요청. 1 정현 2023.11.13 91
3916 유저생성 함수 반복 실행 시, fatal error발생 2 f0081 2023.11.09 103
3915 11.2버전에서 사용자 스키마에 대해서 궁금한 것이 있습니다. 1 로키 2023.11.08 138
3914 저장프로시저 실행관련 문의 4 f0081 2023.11.08 138
3913 다른 소유자 테이블 검색 권한 2 박혀누 2023.11.08 142
3912 [CUBRID Admin] 사용자의 테이블 권한 편집 1 tree1891 2023.11.06 97
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