Background Image

FORUM

조회 수 22366 추천 수 0 댓글 2
?

단축키

Prev이전 문서

Next다음 문서

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

C#에서 자바로 생성한 프로시져 또는 함수를 호출합니다.

자바 프로시져에는 이상이 없는데 C#에서 호출을 하면 다음과 같은 에러가 발생합니다.

Syntax: please check syntax at '{', expecting EOF.

이런 경우가 언제 발생하는지 알고 싶습니다.

프로시져는 첨부 하였습니다. 

cubrid 로그에 다음과 같이 나오고 있습니다.

Time: 12/09/08 15:42:27 - SYNTAX ERROR *** ERROR CODE = -493, Tran = 3
Syntax: please check syntax at '{', expecting EOF.

  • ?
    flypig 2008.12.10 07:34
    정상적으로 SP가 등록 되어 있다면 먼저 질의 편집기를 이용하여 C#에서 사용하던 SP호출을 해 보시기 바랍니다.
    select sp_name(a,b,c...) from db_root;
    만약 질의 편집기를 이용하여 해당 SP가 정상적으로 수행이 된다면 아마도 프로그램에서 호출하는데에서 문제가 있을 것으로 판단됩니다. 문제가 없다면 C#에서 SP를 호출하는 부분만 올려 주신다면 문제를 해결하는데 도움이 될 것 같습니다.
  • ?
    hades 2008.12.10 18:49

    // 큐브리드의 질의편집기에서는 잘 실행이 됩니다.
    //C#에서 프로시져를 호출하는 부분입니다.

    public String DBProcedure(WizhomData data, String commandSTR)
            {
                String resultSTR = null;
                String dataSet = "resultset";
                String fill = "row";

                WizhomData contentData = data.GetWizhomData("content");
                WizhomData sqlData = contentData.GetWizhomData("sql");

                OleDbConnection conn = (OleDbConnection)Connect();
                OleDbDataAdapter adapter = new OleDbDataAdapter();

                String sql = "select sp_ins_member_info('20081210091616890', '고상주', '1111112222222', '02-111-1111', '010-111-1111', '', '', 'sangju', '111') from DB_CLASS where rownum = 1;";//DBConfig.getInstance().Get(sqlData.GetText("id"));

                ArrayList paramAL = sqlData.GetWizhomDataList("param");
                try
                {
                    OleDbCommand command = conn.CreateCommand();
                    command.CommandText = sql;
                    command.CommandType = CommandType.StoredProcedure;

                    /*
                    if (paramAL != null)
                    {
                        for (int i = 0; i < paramAL.Count; i++)
                        {
                            WizhomData paramData = (WizhomData)paramAL[i];
                            String type = paramData.GetText("type").ToLower();
                            String column = StringUtil.nullString(paramData.GetText("column"));
                            String value = paramData.GetText("value");
                            command.Parameters.Add(column, DbType(type)).Value = value;
                        }
                    }
                    */
                   
                        adapter.SelectCommand = command;
                        DataSet ds = new DataSet(dataSet);
                        adapter.Fill(ds, fill);

                        resultSTR = (DBData.ResultData(data.GetWizhomData("head"), "0", ds.GetXml())).GetString();
                   

                }
                catch (Exception e)
                {
                    Logger.log.Error("* DB Procedure Select Error : " + e.GetBaseException());

                    StringBuilder sb = new StringBuilder();
                    sb.Append("<exception>").Append(CommonConfig.getInstance().GetText("message", "error", "dbprocedure")).Append("</exception>");

                    resultSTR = (DBData.ResultData(data.GetWizhomData("head"), "1", sb.ToString())).GetString();
                }
                finally
                {
                    Close(conn, adapter);
                }

                return resultSTR;
            }


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

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

    Date2020.04.09 Byadmin Views4458
    read more
  3. OleDbCommand 를 사용하는데 다음 같은 에러가 발생합니다.

    Date2008.12.10 Byhades Views22366
    Read More
  4. 서브쿼리에서 두개 이상의 데이터를 참조하려면.

    Date2009.03.03 By안지민 Views22320
    Read More
  5. OLEDB 연결 시 에러 발생

    Date2009.02.12 By늘푸른거북이 Views22252
    Read More
  6. cubrid bigint를 java로 가져오는데 문제가 있네요...

    Date2011.01.04 By반짝이 Views22139
    Read More
  7. JDBC ResultSet에 대한 문의

    Date2010.01.15 By강우 Views22135
    Read More
  8. 큐브리드는 mysql 의 varchar(255) 와 동일한 길이가 아니네요?

    Date2009.12.28 By초보 Views22102
    Read More
  9. 테이블목록과 필드목록을 조회하는 방법

    Date2016.11.21 By박경채 Views22081
    Read More
  10. 컴이 느려집니다.

    Date2013.02.10 By또랑 Views22067
    Read More
  11. 64 bit 포팅이란?

    Date2009.03.31 By초보대왕 Views22003
    Read More
  12. 쿼리 질의시 소수점 자리 수 처리 관련

    Date2014.02.14 Bydashbell Views21997
    Read More
  13. 데이터베이스 자동시작 설정 메뉴

    Date2009.01.19 By윤희서 Views21976
    Read More
  14. TO_CHAR 관련 질문입니다.

    Date2010.10.18 By노스 Views21947
    Read More
  15. 오류 좀 확인해주세요ㅜㅜ

    Date2009.12.04 By푸른잔디 Views21923
    Read More
  16. redhat 에서 cubrid 설치방법 문의

    Date2009.10.27 By레드코레아 Views21909
    Read More
  17. cubrid php module이 linux 32bit 에서는 컴파일이 안됩니다.

    Date2008.12.18 By들뿔 Views21847
    Read More
  18. Stored procedure execute error: 자바 저장프로시저 관련오류입니다.

    Date2011.11.01 Bywolf Views21799
    Read More
  19. 설치 및 삭제의 편의성 증대 요청

    Date2009.01.20 By윤희서 Views21699
    Read More
  20. 델파이 ADOStoredProcedure 컴포넌트에서 큐브리드저장함수의 리턴값을 받고싶습니다.

    Date2011.11.03 Bywolf Views21626
    Read More
  21. 4.0 beta CUBRID HA관련 문제...

    Date2011.05.18 By반짝이 Views21610
    Read More
  22. 게시판의 이전글 다음글 구현 쿼리질문

    Date2009.05.29 By김형일 Views21597
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 ... 200 Next
/ 200

Contact Cubrid

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