Beispiel #1
0
        /// <summary>
        /// 执行非查询SQL语句
        /// </summary>
        /// <param name="ClientCode">客户端代码</param>
        /// <param name="DbName">数据库名称</param>
        /// <param name="TransID">事务ID</param>
        /// <param name="SqlText">Sql 文本</param>
        /// <param name="SqlParams">Sql 参数,参数值所在位置必须与参数名一致</param>
        /// <returns>返回影响的数据行</returns>
        public int Execute(string ClientCode, string DbName, string TransID, string SqlText, object[] SqlParams)
        {
            Data.DBConnection dbConn = Data.DBConfig.GetDBConnection(ClientCode, DbName);
            LogClientTransaction(TransID);
            IDataClient idc = GetDataClient(dbConn.DBType);

            return(idc.Execute(TransID, dbConn.ConnectionString, SqlText, SqlParams));
        }