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 48
공지 SQLGate for CUBRID 영구 무료 라이선스 제공 file admin 2020.04.09 4458
1194 asp.net 의 oledb 연동 3 webdoors 2009.01.04 38313
1193 asp.net 윈도우즈 설치 문의 3 shblitz 2011.12.29 14673
1192 asp.net ibatis connection string is null 1 noy 2020.02.04 680
1191 asp 에서 olddb driver 사용시 parameter 문제 4 file 데베안 2012.10.10 7661
1190 asp 레퍼런스가 있나요? 1 바다왕자님 2010.01.21 10357
1189 asp oledb로 연결해서 사용시 1 슈퍼뚱땡이 2016.03.08 8948
1188 asc, desc 기능 존재 여부와 sort 속도. 1 아장아장 2009.09.08 14420
1187 archive log 삭제 관해서 3 알칸펠 2013.11.08 11977
1186 app interface 에 관해서 1 hellower 2009.08.27 8563
1185 alter로 테이블 구조 변경 3 장이 2012.02.06 11534
1184 alter 시 오류 메세지 1 김성일컴퍼니 2013.08.06 8909
1183 alter 시 오류 (화면캡쳐) 1 file 김성일컴퍼니 2013.08.06 7183
1182 alter 문 관련 질문 1 gkdydejr 2015.10.06 5428
1181 alter table add constraint foreign key 문의 1 dasomoh 2020.07.28 1500
1180 alter MODIFY 실행시 오류 1 봉수비어 2017.10.11 419
1179 alias 명 한글 깨짐 2 abc12 2018.08.13 54082
1178 aix에 cubrid 설치 시 오류 1 김개미 2017.11.23 337
1177 ado.net에서 insert query 문 1 바람바람 2012.11.07 8871
» ado.net 사용하여 테스트중인데 오류 발생하여 문의 남깁니다 3 file 제무다 2018.06.29 441
1175 ado.net c# 으로 프로시저 콜 또는 프로시저 생성방법은 어떻게되나요 1 땅콩z 2013.07.19 10804
Board Pagination Prev 1 ... 136 137 138 139 140 141 142 143 144 145 ... 200 Next
/ 200

Contact Cubrid

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