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 49
공지 SQLGate for CUBRID 영구 무료 라이선스 제공 file admin 2020.04.09 4458
3674 A serial object already exists as an auto increment constraint. 오류 질문 1 kimsuny 2013.10.28 15984
3673 OUTER JOIN 관련해서 질문 드립니다. 2 이석희 2009.04.14 15977
3672 php, cubrid에서 그림, 동영상파일업로드코딩중인데요. 1 난꼭한다 2010.01.11 15937
3671 java 에서 result.getString() 함수로 긴 문자열 읽어올때 짤리는 현상 2 yept 2010.10.14 15892
3670 ODBC 다중 접속 댓글을 보고 나서... 7 ApiClasser 2009.05.20 15888
3669 JAVA 프로시져 4 벅지 2009.02.24 15881
3668 invaild buffer position error 3 바람바람 2013.04.05 15869
3667 java vm is not running 1 yoon 2010.04.03 15859
3666 설치 에러 로그 확인 부탁 드립니다. 8 우페 2009.02.19 15831
3665 ha 스크립트 step3 Permission denied, please try again 2 QA 2013.09.25 15830
3664 서버에접속할수없습니다... 1 file 가라 가라~ 2009.01.14 15812
3663 cubrid function(JAVA)생성시 PreparedStatement의'?'사용하면 문제 발생 2 수서기다 2016.12.13 15804
3662 데이터베이스 서버 start가 안됩니다 7 삽질쟁이 2009.06.04 15798
3661 Microsoft Visual C++ 2008 재배포 가능 패키지 설치 안하고 Trayicon 보이게 하는 방법 1 혀니짱 2011.04.11 15795
3660 CUBRID로 마이그레이션 질문 1 으라챠챠 2016.12.09 15751
3659 migration toolkit 사용시 Got minus one from a read call 에러 발생 1 말랑 2014.02.13 15722
3658 autocommit off 방법 문의 9 소라게 2010.06.08 15702
3657 Unable to access system message catalog.(null) 5 공기청정기 2009.05.14 15693
3656 저장프로시저 함수-loadjava 3 쪼로롱 2010.02.23 15673
3655 Java VM is not running 오류 원인? 6 file 강나루소나무 2012.02.10 15658
Board Pagination Prev 1 ... 12 13 14 15 16 17 18 19 20 21 ... 200 Next
/ 200

Contact Cubrid

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