Exemple #1
0
        public static DataTable GetDataTableWithSqlProxy(string tableName, string sql, SqlConnection conn)
        {
            DataTable table = null;

            if (Program.EnableRemoting)
            {
                table = mDataTableProxy.GetDataTableWithSql(tableName, sql);
            }
            else
            {
                sql   = ConvertSqlString(tableName, sql);
                table = GetDataTable(sql, conn);
            }
            return(table);
        }
Exemple #2
0
        public static DataTable GetScriptStoreProxy(string[] names, string sql)
        {
            DataTable table = null;

            if (m_htScriptStore[sql] == null && Program.EnableRemoting)
            {
                table = mDataTableProxy.GetDataTableWithSql(names, sql);

                if (m_htScriptStore.Keys.Count > scriptStoreCacheSize)
                {
                    m_htScriptStore.Clear();
                }

                m_htScriptStore[sql] = table;
            }
            else
            {
                table = GetScriptStore(sql);
            }

            return(table);
        }