コード例 #1
0
ファイル: CrossTable.cs プロジェクト: ikvm/test
 private int method_7(int int_8)
 {
     switch (PubFunction.ConvertIntToTypeCode(int_8))
     {
     case TypeCode.SByte:
     case TypeCode.Byte:
     case TypeCode.Int16:
     case TypeCode.UInt16:
     case TypeCode.Int32:
     case TypeCode.UInt32:
     case TypeCode.Int64:
     case TypeCode.UInt64:
     case TypeCode.Double:
     case TypeCode.Decimal:
         return(2);
     }
     return(1);
 }
コード例 #2
0
ファイル: CrossTable.cs プロジェクト: ikvm/test
 private int method_6(int int_8)
 {
     switch (PubFunction.ConvertIntToTypeCode(int_8))
     {
     case TypeCode.Char:
     case TypeCode.SByte:
     case TypeCode.Byte:
     case TypeCode.Int16:
     case TypeCode.UInt16:
     case TypeCode.Int32:
     case TypeCode.UInt32:
     case TypeCode.Int64:
     case TypeCode.UInt64:
     case TypeCode.String:
         return(111);
     }
     return(2);
 }
コード例 #3
0
ファイル: ClobField.cs プロジェクト: ikvm/test
        public string writeClob()
        {
            this.dboperator_0 = this.connectionConfig_0.getDBOperator();
            this.dboperator_0.Open();
            string         str2        = "";
            string         strSour     = new StreamReader(this.httpRequest_0.InputStream).ReadToEnd();
            IDbCommand     myComm      = null;
            IDbTransaction transaction = null;

            try
            {
                myComm             = this.dboperator_0.Connection.CreateCommand();
                myComm.Connection  = (this.dboperator_0.Connection);
                transaction        = this.dboperator_0.Connection.BeginTransaction();
                myComm.Transaction = (transaction);
                if (myComm is OleDbCommand)
                {
                    str2 = "Update " + this.string_0 + " set " + this.string_1 + "=? where " + this.string_2 + "='" + this.string_3 + "'";
                    myComm.CommandText = (str2);
                    object[] objParams = new object[] { strSour };
                    this.dboperator_0.AddParams(myComm, objParams);
                }
                else if (myComm is OracleCommand)
                {
                    myComm.Parameters.Clear();
                    OracleLob lob = PubFunction.strToClob((OracleCommand)myComm, strSour);
                    myComm.Parameters.Clear();
                    str2 = "Update " + this.string_0 + " set " + this.string_1 + "=:imgParam where " + this.string_2 + "='" + this.string_3 + "'";
                    myComm.CommandText = (str2);
                    OracleParameter parameter = new OracleParameter();
                    parameter.ParameterName = ("imgParam");
                    parameter.OracleType    = (OracleType)(4);
                    parameter.Value         = (lob);
                    myComm.Parameters.Add(parameter);
                }
                myComm.ExecuteNonQuery();
                transaction.Commit();
                myComm.Dispose();
                this.dboperator_0.Close();
            }
            catch (Exception exception)
            {
                try
                {
                    transaction.Rollback();
                    myComm.Dispose();
                }
                catch (Exception)
                {
                }
                throw exception;
            }
            finally
            {
                try
                {
                    this.dboperator_0.Close();
                }
                catch (Exception)
                {
                }
            }
            return("");
        }