Background Image

FORUM

2021.09.14 13:21

ADO.NET 에러

조회 수 67 추천 수 0 댓글 1
?

단축키

Prev이전 문서

Next다음 문서

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


* 질문 등록 시 다음의 내용을 꼭 기입하여 주세요.

OS
Window10 64bit
CUBRID Ver.
CUBRID 11.0 (11.0.2.0291-a507059) (64bit release build for Windows) (Jul 19 2021 17:58:23)
CUBRID TOOL Ver.
[도움말]-[버전정보] 확인
응용 환경(API)
ADO.NET


* CUBRID 응용 오류, SQL 오류 또는 SQL 튜닝 관련된 문의는 반드시 다음의 내용을 추가해 주세요. 비밀글이나 비밀 댓글도 가능합니다.
* 저희가 상황을 이해하고, 재현이 가능해야 알 수 있는 문제들이 많습니다. 가능한 정보/정황들을 부탁합니다.

 

에러 내용 및 재현 방법 재현 가능한 Source와 SQL
관련 테이블(인덱스, 키정보 포함) 정보 CUBRID 홈 디렉토리 아래 log 디렉토리 압축


-------------- 아래에 질문 사항을 기입해 주세요. ------------------------------------------------------------------------
ADO.NET 에서 아래와 같이 Parameter를 추가하면 System.NullReferenceException이 발생합니다.

개발환경은 vs2019, C#, .net4.0 입니다. 도움 부탁드립니다.

 

CUBRIDCommand.Parameters.Add("?code", CUBRIDDataType.CCI_U_TYPE_VARNCHAR)

 

 

  • ?
    airnet 2021.09.14 14:52
    큐브리드를 이용해 주셔서 감사합니다.

    질문하신 코드만 봐서는 정확히 알 수 없으나, 아래의 간단한 예제 코드로 테스트 부탁드립니다.

    참고로, VARNCHAR 타입은 9.0 버전부터 더 이상 지원하지 않습니다. 따라서 parameter를 add 하실때 CCI_U_TYPE_VARNCHAR 대신 CCI_U_TYPE_CHAR 또는 CCI_U_TYPE_STRING 을 사용 부탁드립니다.
    https://www.cubrid.org/manual/ko/11.0/sql/datatype.html?highlight=nchar%20nchar%20varying#char-data-type

    ADO.Net 에서 parameter를 사용 가이드는 아래의 주소를 참고해 주세요
    https://www.cubrid.org/manual/ko/11.0/api/adodotnet.html#id10

    예제 코드)
    using (CUBRIDCommand cmd = new CUBRIDCommand("select id, name from ado_test where name=?", conn))
    {
    CUBRIDParameter p1 = cmd.Parameters.Add("?name", CUBRIDDataType.CCI_U_TYPE_CHAR);
    p1.Value = "test_name1";

    cmd.ExecuteNonQuery();

    using (DbDataReader reader = cmd.ExecuteReader())
    {
    while (reader.Read())
    {
    Console.WriteLine(i + " : " + reader[0].ToString() + ", " + reader[1].ToString());
    }
    reader.Close();
    }
    cmd.Close();
    }

  1. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

    Date2024.04.23 Byadmin Views51
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4458
    read more
  3. 문의사항 2(csql, java스토어드프로시저)개

    Date2021.10.14 Bygo Views115
    Read More
  4. 데이터조회가 안되는 현상

    Date2021.10.13 By연습용 Views267
    Read More
  5. HA slave applydblog 오류 문의

    Date2021.10.13 By아리별 Views204
    Read More
  6. SpingFrameWork에서 Mybatis 사용시 Merge문 사용과 관련된 에러 문의드립니다.

    Date2021.10.13 By고대장 Views791
    Read More
  7. java strored procedure 구현 관련 문의(도큐먼트 참고 불가)

    Date2021.10.12 Byihyeon0214 Views381
    Read More
  8. 함수 생성 관련 문의

    Date2021.10.12 Bybnb0165 Views81
    Read More
  9. cubrid to oracle 마이그레이션

    Date2021.10.08 By하영창 Views191
    Read More
  10. 데이터베이스 복구 문제입니다

    Date2021.10.08 By황수연 Views649
    Read More
  11. 2000년대 날짜 입력 시 오류

    Date2021.10.08 By떼잉 Views118
    Read More
  12. insert ,update,delete 트리거 질문하겠습니다.

    Date2021.10.06 By연습용 Views482
    Read More
  13. Cubrid admin 접속 관련 문의

    Date2021.10.05 By나리아 Views147
    Read More
  14. 오라클에서 max() keep의 기능은 어떻게 변경해야할까요

    Date2021.10.05 By12 Views324
    Read More
  15. 설치시 오류관련 질문입니다

    Date2021.10.05 By유글 Views230
    Read More
  16. edit host 에러 문의

    Date2021.10.01 Byyong Views93
    Read More
  17. 큐브리드 매니저에서 질의 실행계획 질문하겠습니다.

    Date2021.10.01 By연습용 Views262
    Read More
  18. CUBRID 엔진 설치 시 중단증상2

    Date2021.09.27 Bysoso Views132
    Read More
  19. CUBRID 엔진 설치 시 중단증상

    Date2021.09.26 Bysoso Views125
    Read More
  20. 한국방송통신대학교 과제에 큐브리드 사용시 에러 질문 입니다.

    Date2021.09.26 By대모산까치 Views470
    Read More
  21. Generic 볼륨이 계속해서 증가합니다.

    Date2021.09.24 Bywowowow Views192
    Read More
  22. 계층형 쿼리 내 집계함수 사용 문의

    Date2021.09.24 ByRaven Views133
    Read More
Board Pagination Prev 1 ... 20 21 22 23 24 25 26 27 28 29 ... 200 Next
/ 200

Contact Cubrid

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