コード例 #1
0
ファイル: FormRebuildTableOld.cs プロジェクト: wj60387/hubble
        private string GetOracleFieldNameList(long from)
        {
            QueryResult qResult = DataAccess.Excute(string.Format("exec sp_columns '{0}'", TableName));

            StringBuilder sb = new StringBuilder();

            if (_DocIdReplaceField == null)
            {
                sb.AppendFormat(" DocId ", numericUpDownStep.Value);

                foreach (DataRow row in qResult.DataSet.Tables[0].Rows)
                {
                    sb.AppendFormat(", {0} ", Oracle8iAdapter.GetFieldName(row["FieldName"].ToString()));
                }
            }
            else
            {
                int i = 0;
                foreach (DataRow row in qResult.DataSet.Tables[0].Rows)
                {
                    if (i == 0)
                    {
                        sb.AppendFormat("{0} ", Oracle8iAdapter.GetFieldName(row["FieldName"].ToString()));
                    }
                    else
                    {
                        sb.AppendFormat(", {0} ", Oracle8iAdapter.GetFieldName(row["FieldName"].ToString()));
                    }

                    i++;
                }
            }

            return(sb.ToString());
        }
コード例 #2
0
        private string GetOracleSelectSql(long from)
        {
            string fields = GetOracleFieldNameList(from);

            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("select {0} from {1} where {4} > {2} and rownum <= {3} order by {4} ",
                            fields, _DBProvider.Table.DBTableName, from, _Step, Oracle8iAdapter.GetFieldName(_DBProvider.Table.DocIdReplaceField));

            return(sb.ToString());
        }
コード例 #3
0
        private string GetOracleFieldNameList(long from)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(" DocId ");

            foreach (Field field in _DBProvider.Table.Fields)
            {
                sb.AppendFormat(", {0} ", Oracle8iAdapter.GetFieldName(field.Name));
            }

            return(sb.ToString());
        }
コード例 #4
0
        private string GetOracleFieldNameList(long from)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(" {0} ", Oracle8iAdapter.GetFieldName(_DBProvider.Table.DocIdReplaceField));

            foreach (Field field in _DBProvider.Table.Fields)
            {
                if (field.Name.Equals(_DBProvider.Table.DocIdReplaceField, StringComparison.CurrentCultureIgnoreCase))
                {
                    continue;
                }

                sb.AppendFormat(", {0} ", Oracle8iAdapter.GetFieldName(field.Name));
            }

            return(sb.ToString());
        }