// 큐브리드의 질의편집기에서는 잘 실행이 됩니다.
//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);
}