Esempio n. 1
0
        public static string main(ArrayList arlStr)
        {
            string ret = "";//正确返回:【OK】,错误:【ERR:XXX】,其它返回JSON串

            if (arlStr.Count < 1)
            {
                return("ERR:" + "SQL参数必须为:【CONN/SQLGET_???/SQLEXEC_???/PROC_???/EXT_???】,请使用正确的调用方法!");
            }
            switch ((string)arlStr[0])
            {
            case "CONN":
                ret = "";    //DbHelperOra.ConnDb();
                if (ret == "")
                {
                    ret = "OK";
                }
                break;

            case "SQLGET":         //执行通用取数SQL得到数据
                ret = DbHelperOra.SQL_GetData(arlStr);
                break;

            case "SQLEXEC":         //执行通用SQL更新数据库,单条INSERT或UPDATE,返回ok/errors
                ret = DbHelperOra.SQL_ExecSQL(arlStr);
                break;

            case "PROC":            //执行通用过程,返回ok/errors
                ret = DbHelperOra.SQL_ExecProc(arlStr);
                break;

            case "EXT":             //其它扩展应用,返回ok/errors
                ret = AjaxExt.Exec(arlStr);
                break;

            default:
                ret = "ERR:" + "SQL参数必须为:【CONN/SQLGET_???/SQLEXEC_???/PROC_???/EXT_???】,请使用正确的调用方法!";
                break;
            }
            return(ret);
        }