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
번호 제목 글쓴이 날짜 조회 수
공지 SQLGate for CUBRID 영구 무료 라이선스 제공 file admin 2020.04.09 4442
3347 phpCubAdmin 로그인 문제 3 월희향 2010.05.19 11751
3346 CUBRID 2008 R2.2 매니저 한글문제 3 file 겜기능되거든 2010.05.19 11833
3345 server를 start하면 에러가 납니다. 1 secret 꿈계 2010.05.22 15
3344 문의 드립니다. 1 지원아비 2010.05.24 9637
3343 unisql에 관한 여라가지 궁금한 점이 있습니다..꼭 좀..ㅠ 1 얏호오~ 2010.05.25 9516
3342 큐브리드 매니저 문의입니다 1 겜기능되거든 2010.05.27 9798
3341 가상화를 이용한 복제기능의 성능이 궁금합니다 1 유니콘 2010.05.27 11250
3340 쿼리 문의 입니다. 3 인경수 2010.05.28 9691
3339 데이터베이스 백업본 다른 서버에 복구하기 4 종이 2010.06.03 13147
3338 특정 테이블 복구는 ? 6 file 인경수 2010.06.03 12969
3337 cub_master: 로컬 어드레스를 바인드할 수 없습니다... 중지.... Address already in use 1 모야 2010.06.04 10776
3336 cubrid manser server start: fail 질문드립니다. 4 네이허 2010.06.04 18274
3335 cubrid 2008 R 2.1에서 2.2 버전으로 업그레이드 문의 2 file 종이 2010.06.04 10498
3334 R2.2 에서 엑셀로 보내기가 않되는 것 같습니다. 1 배워볼까 2010.06.05 9805
3333 독립실행모드에서 unloaddb 할 경우. 1 인경수 2010.06.05 14326
3332 큐브리드 R2.2 PHP모듈 XP서 컴파일 방법 문의 1 아장아장 2010.06.05 9927
3331 큐브리드 메니저 2.2 에서 엑셀파일 임포트는 어떻게? 1 penmouse 2010.06.05 11177
3330 큐브리드 R2.2 PHP모듈 XP서 컴파일 방법 문의2 2 file 아장아장 2010.06.05 9625
3329 CUBRID와 PHP 연동 문제 1 Ele 2010.06.06 11427
3328 Cubrid Manager 오류 문의 1 jjobi 2010.06.08 19660
Board Pagination Prev 1 ... 28 29 30 31 32 33 34 35 36 37 ... 200 Next
/ 200

Contact Cubrid

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