Background Image

FORUM

?

단축키

Prev이전 문서

Next다음 문서

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

델파이에서 큐브리드저장함수의 리턴값을받고싶은데 어떻게 하면 될가요.

ADOStoredProcedure컴포넌트를 이용해서 MS-SQL저장프로시저호출방법을 이용해봣는데 오류가발생합니다.

큐브리드에선 어떤 방법을 이용해야하는지 알고계시는분좀 알려주세요.

아래내용을 참고해서 했는데 오류가 발생합니다.


출처:http://niceit.tistory.com/42


01  procedure TMedia_Section.Insert;
02var
03  ads : TADOStoredProc;
04begin
05  ads := eyeDM.CreateADOStoredProc;
06  try
07    ads.ProcedureName := 'usp_mediasection_update';
08    ads.Parameters.CreateParameter('@RETURN_VALUE',ftInteger,pdReturnValue,0,0);   // <-- 반드시 첫번재 파라미터로 선언
09    ads.Parameters.CreateParameter('@SNo', ftInteger, pdInput, 40);
10    ads.Parameters.CreateParameter('@SCT', ftString, pdInput, 5'');
11    ads.Parameters.CreateParameter('@Section_Name', ftString, pdInput, 200'');
12    ads.Parameters.CreateParameter('@Priority', ftInteger, pdInput, 40);
13    ads.Parameters.CreateParameter('@Note', ftString, pdInput, 255'');
14    ads.Parameters.CreateParameter('@NCT', ftString, pdInput, 4'');
15    ads.Parameters.CreateParameter('@filterStr', ftString, pdInput, 100'');
16    ads.Parameters.CreateParameter('@regExpr', ftString, pdInput, 100'');
17 
18    ads.Parameters.ParamByName('@SNo').Value := FSNo;
19    ads.Parameters.ParamByName('@SCT').Value := FSCT;
20    ads.Parameters.ParamByName('@Section_Name').Value := FSection_Name;
21    ads.Parameters.ParamByName('@Priority').Value := FPriority;
22    ads.Parameters.ParamByName('@Note').Value := FNote;
23    ads.Parameters.ParamByName('@NCT').Value := FNCT;
24    ads.Parameters.ParamByName('@filterStr').Value := FFilterStr;
25    ads.Parameters.ParamByName('@regExpr').Value := FRegExpr;
26 
27    ads.ExecProc;
28 
29   FSNo := ads.Parameters.ParamByName('@RETURN_VALUE').value; // <-- 리턴 값을 받아온다
30 finally
31    ads.Free;
32  end;
33end;

  • ?
    cubebridge 2011.11.03 08:30

    안녕하세요.

    큐브리드에 관심을 가져 주셔서 감사합니다. 문의하신 내용에 대하여 빠른 시일 내에 확인하여 알려드리도록 하겠습니다.

  • ?
    seongjoon 2011.11.03 23:36

    CUBRID는 말씀하신 것과 같은 procedure을 지원하지 않습니다. 

    해당 로직이 정확히 어떤 동작을 하는지 알수는 없지만, 일반적인 preparestatement처럼 사용하는 것이라면 응용단에서 구현하셔서 사용하시면 됩니다.


List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 SQLGate for CUBRID 영구 무료 라이선스 제공 file admin 2020.04.09 4266
1036 Table 및 Index 가 사용하고 크기를 알수 있는 방법을 알려 주세요 6 브이찾기 2016.03.19 9620
1035 Table 및 Column Comment 작성 2 김상윤 2013.02.27 11897
1034 Table primary key잡는 중 중단 시키고, 서버 재시작하니 에러나고 시작이 안되네요. 1 미스터투 2011.06.28 7762
1033 Table doesn't exist 에러.. 3 secret 가라가라 2016.12.05 10
1032 Table Drop, truncate 시 시간이 너무 오래 걸립니다. 5 steve 2022.08.29 679
1031 Table Drop 후 데이터 볼륨 Size 에 변동이 없네요. 3 브이찾기 2016.03.24 9327
1030 TO_DATETIME 함수 문의 드립니다. 2 풍류인생 2020.12.29 415
1029 TO_CHAR 관련 질문입니다. 3 노스 2010.10.18 21945
1028 TIMEZONE 질문 1 은팔 2014.01.08 12461
1027 TIMESTAMP 형 data를 insert 하는 sql문이 궁금합니다. 1 yongsu9 2011.05.28 34835
1026 TIME 포맷 관련 질문 입니다. 1 이승훈 2009.03.19 12103
1025 System.Data.OleDb.OleDbException (0x80004005): Cannot communicate with server 오류 4 나이젤 2014.05.28 9677
1024 Sum 에서 Overflow occurred in addition context 발생 2 file 오션나인 2013.10.12 11786
1023 Sulinux 64Bit 와 CUBRID 4.0 정식 버젼 체크좀 부탁드립니다... 5 반짝이 2011.07.05 8445
1022 StoredProcedure 한글 문제 및 getConnection 문제 4 조경석 2014.06.11 9390
1021 Stored procedure execute error: 자바 저장프로시저 관련오류입니다. 8 wolf 2011.11.01 21776
1020 Store Procedure 호출 관련 질문 1 키레이니 2018.05.28 500
1019 Store Procedure 작성 관련 질문 1 키레이니 2018.05.28 376
1018 Standalone 2 secret 델몬트 2015.08.19 9
1017 SpringFramwork, Hobernate and Cubrid 2 willy 2010.09.28 8214
Board Pagination Prev 1 ... 143 144 145 146 147 148 149 150 151 152 ... 199 Next
/ 199

Contact Cubrid

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