• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# OleDbType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中OleDbType的典型用法代码示例。如果您正苦于以下问题:C# OleDbType类的具体用法?C# OleDbType怎么用?C# OleDbType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OleDbType类属于命名空间,在下文中一共展示了OleDbType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: genParameter

        protected DbParameter genParameter(String paramName, OleDbType type, int size, Object value)
        {
            if (value == null)
                value = DBNull.Value;

            DbParameter param = null;

            if (type == OleDbType.DBTimeStamp)
            {
                if (value == DBNull.Value)
                {
                    param = new OleDbParameter(paramName, value);
                }
                else
                {
                    param = new OleDbParameter(paramName, ((Nullable<DateTime>)value).Value);
                }
            }
            else
            {
                param = new OleDbParameter(paramName, type, size);
                param.Value = value;
            }

            return param;
        }
开发者ID:zyh329,项目名称:fpv2,代码行数:26,代码来源:BaseDAO.cs


示例2: AddOutParamToSqlCommand

 public static OleDbParameter AddOutParamToSqlCommand(OleDbCommand comm, string pName, OleDbType pType)
 {
     OleDbParameter param = new OleDbParameter(pName, pType);
     param.Direction = ParameterDirection.Output;
     comm.Parameters.Add(param);
     return param;
 }
开发者ID:eseawind,项目名称:sac-hnss,代码行数:7,代码来源:DBdb2.cs


示例3: GetDbType

		/// <summary>
		/// Returns the matching DBType for this OleDBtype
		/// </summary>
		/// <param name="type">OleDbType to convert</param>
		/// <returns>Corresponding DbType</returns>
		public static DbType GetDbType(OleDbType type)
		{
			if (!typeLookup.ContainsKey(type))
				return default(DbType); // Default is ANSIString = 0

			return typeLookup[type];
		}
开发者ID:nkoterba,项目名称:Simple.Data.Access,代码行数:12,代码来源:OleDbToDbTypeConverter.cs


示例4: OleDbField

 public OleDbField(int tableIndex, string fieldName, OleDbType dataType, bool visible)
 {
     this.tabIndex = tableIndex;
      this.fldName = fieldName;
      this.dbType = dataType;
      this.visible = visible;
 }
开发者ID:ffcouto,项目名称:FreeSQL,代码行数:7,代码来源:OleDbField.cs


示例5: button2_Click

 private void button2_Click(object sender, EventArgs e)
 {
     if (isNumber(tbSwim.Text.Trim()))
     {
         string name = "PACK_BANKNET.Proc_ExceptionHold_Comeback";
         string[] InParaName = new string[1] { "v1_swim_id" };
         string[] OutParaName = new string[1] { "v2_out_ret" };
         OleDbType[] InParaType = new OleDbType[1] { OleDbType.Numeric };
         OleDbType[] OutParaType = new OleDbType[1] { OleDbType.Numeric };
         string[] InParaValues = new string[1] { tbSwim.Text.Trim() };
         string[] OutParaValues = new string[1];
         for (int i = 0; i < 1; i++)
             OutParaValues[i] = "";
         int[] OutParaSize = new int[1] { 0 };
         string err = "";
         this.Cursor = Cursors.WaitCursor;
         Businessbp.executedb.ExecuteProcTCBS(name, InParaName, InParaType, InParaValues, OutParaName, OutParaType, OutParaSize, ref  OutParaValues, ref  err);
         this.Cursor = Cursors.Default;
         if (err != "")
             MessageBox.Show(err);
         else
         {
             if (OutParaValues[0].ToString() == "-1")
             {
                 MessageBox.Show("Proccess unsuccessful.");
             }
             else
             {
                 MessageBox.Show("Proccess successful.");
             }
         }
     }
     else
         MessageBox.Show("Invalid swim id");
 }
开发者ID:phongferrari,项目名称:banknet-domestic,代码行数:35,代码来源:frmExceptionHold.cs


示例6: button2_Click

 private void button2_Click(object sender, EventArgs e)
 {
     string name = "PACK_BANKNET.Proc_Release";
     string[] InParaName = new string[1] { "v1_swim_id" };
     string[] OutParaName = new string[1] { "v2_out_ret" };
     OleDbType[] InParaType = new OleDbType[1] { OleDbType.Numeric };
     OleDbType[] OutParaType = new OleDbType[1] { OleDbType.Numeric };
     string[] InParaValues = new string[1] { swim_id };
     string[] OutParaValues = new string[1];
     for (int i = 0; i < 1; i++)
         OutParaValues[i] = "";
     int[] OutParaSize = new int[1] { 0 };
     string err = "";
     this.Cursor = Cursors.WaitCursor;
     Businessbp.executedb.ExecuteProcTCBS(name, InParaName, InParaType, InParaValues, OutParaName, OutParaType, OutParaSize, ref  OutParaValues, ref  err);
     this.Cursor = Cursors.Default;
     if (err != "")
         MessageBox.Show(err);
     else
     {
         if (OutParaValues[0].ToString() == "-1")
         {
             tbStatus.Text = "Release unsuccessful.";
             MessageBox.Show("Release unsuccessful.");
         }
         else
         {
             tbStatus.Text = "Release successful.";
             MessageBox.Show("Release successful.");
             button2.Enabled = false;
         }
     }
 }
开发者ID:phongferrari,项目名称:banknet-domestic,代码行数:33,代码来源:frmRelease.cs


示例7: ExecuteSqlParameter

 public ExecuteSqlParameter(string name, string variableName, ParameterDirections direction, OleDbType oleDBType, int length)
 {
     Name = name;
     VariableName = variableName;
     Direction = direction;
     OleDBType = oleDBType;
     Length = length;
 }
开发者ID:japj,项目名称:vulcan,代码行数:8,代码来源:ExecuteSqlParameter.cs


示例8: AddParameter

 public OleDbParameter AddParameter(string ParameterName, OleDbType type, int size, object value, ParameterDirection direction)
 {
     OleDbParameter param = new OleDbParameter(ParameterName, type, size);
     param.Direction = direction;
     param.Value = value;
     Command.Parameters.Add(param);
     return param;
 }
开发者ID:hj-nicholas,项目名称:BaseFrame,代码行数:8,代码来源:AccessHelper.cs


示例9: IsOleDbTypeValidForIDCol

 public static bool IsOleDbTypeValidForIDCol(OleDbType ot)
 {
     if (ot == OleDbType.Integer
         || ot == OleDbType.BigInt
         || ot == OleDbType.SmallInt
         || ot == OleDbType.TinyInt
         || ot == OleDbType.Guid) return true;
     else return false;
 }
开发者ID:sgtgold,项目名称:bids-helper-extension,代码行数:9,代码来源:frmSQLFlattener.cs


示例10: button2_Click

        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                string sql = "", err1 = "";
                DataTable dt;

                string name = Businessbp.executedb.owner + "proc_check88";

              //              proc_check88(
              //fromdate in varchar2,
              //todate in varchar2,
              //r_count out number,
              //Result_out out number,
              //Emsg_out out varchar2)
                string FromDate = "", ToDate = "";
                FromDate = dtFrom.Text + " " + tbFhh.Text + ":" + tbFmi.Text + ":" + tbFss.Text;
                ToDate = dtTo.Text + " " + tbThh.Text + ":" + tbTmi.Text + ":" + tbTss.Text;

                string[] InParaName = new string[2] { "fromdate", "todate" };
                string[] OutParaName = new string[3] { "r_count", "Result_out", "Emsg_out" };
                OleDbType[] InParaType = new OleDbType[2] { OleDbType.VarChar, OleDbType.VarChar };
                OleDbType[] OutParaType = new OleDbType[3] { OleDbType.Numeric, OleDbType.Numeric, OleDbType.VarChar };

                string[] InParaValues = new string[2] { FromDate, ToDate };
                string[] OutParaValues = new string[3];
                for (int i = 0; i < 3; i++)
                    OutParaValues[i] = "";
                int[] OutParaSize = new int[3] { 0 , 0 , 300 };
                string err = "";
                Businessbp.executedb.ExecuteProcELECTRA(name, InParaName, InParaType, InParaValues, OutParaName, OutParaType, OutParaSize, ref  OutParaValues, ref  err);
                if (err != "")
                    MessageBox.Show(err);
                else
                {
                    int r_count = Int32.Parse(OutParaValues[0].ToString());
                    int Result_out = Int32.Parse(OutParaValues[1].ToString());
                    string Emsg_out = OutParaValues[2].ToString();
                    if (Result_out != 1)
                    {
                        MessageBox.Show(Emsg_out);
                        return;
                    }
                    else
                    {
                        MessageBox.Show("Process successfull!!!");
                        LoadData();
                    }
                }
                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
开发者ID:phongferrari,项目名称:source-code-nama,代码行数:57,代码来源:Frm_Check_Accounting_Check88.cs


示例11: ColumnDefinition

		public ColumnDefinition(String name, bool primaryKey, 
			bool foreignKey, bool unique, bool nullable, OleDbType type)
		{
			_name = name;
			_primaryKey = primaryKey;
			_foreignKey = foreignKey;
			_unique = unique;
			_nullable = nullable;
			_type = type;
		}
开发者ID:ralescano,项目名称:castle,代码行数:10,代码来源:ColumnDefinition.cs


示例12: ColumnInfo

 public ColumnInfo(string name, long ordinalPosition, OleDbType dbType, long? characterMaxLength, int? numericPrecision, int? numericScale, bool isPrimaryKey = false)
 {
     Name = name;
     OrdinalPosition = ordinalPosition;
     DbType = dbType;
     CharacterMaxLength = characterMaxLength;
     NumericPrecision = numericPrecision;
     NumericScale = numericScale;
     IsPrimaryKey = isPrimaryKey;
 }
开发者ID:bbeardsley,项目名称:TmgExporter,代码行数:10,代码来源:ColumnInfo.cs


示例13: Process

        private void Process()
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                string name = "";
                const int out_para = 2;
                name += "" + Businessbp.executedb.owner + "proc_nab_thucno";
                //string type = "Pre_Transaction_Upload";
                string in_parameter = "";

                string[] InParaName = new string[1] { "user_id" };
                string[] OutParaName = new string[out_para] { "Result_out", "Emsg_out" };
                OleDbType[] InParaType = new OleDbType[2] { OleDbType.VarChar, OleDbType.VarChar };
                OleDbType[] OutParaType = new OleDbType[out_para] { OleDbType.Numeric, OleDbType.VarChar};

                string[] InParaValues = new string[1] { Businessbp.executedb.Usrid };
                string[] OutParaValues = new string[out_para];
                for (int i = 0; i < out_para; i++)
                    OutParaValues[i] = "";
                int[] OutParaSize = new int[out_para] { 0, 500};
                string err = "";
                Businessbp.executedb.ExecuteProcELECTRA(name, InParaName, InParaType, InParaValues, OutParaName, OutParaType, OutParaSize, ref  OutParaValues, ref  err);
                if (err != "")
                {
                    MessageBox.Show(err);
                    this.Cursor = Cursors.Default;
                    return;
                }
                else
                {
                    int Result_out = Int32.Parse(OutParaValues[0].ToString());
                    string Emsg_out = OutParaValues[1].ToString();
                    if (Result_out != 1)
                    {
                        MessageBox.Show(Emsg_out);
                        tbStatus.Text = Emsg_out;
                        this.Cursor = Cursors.Default;
                        return;
                    }
                    else
                    {
                        //Parse out_parameter nếu cần thiết
                        tbStatus.Text = "Successfull!!!";
                        MessageBox.Show("Successfull!!!");
                    }
                }
                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                this.Cursor = Cursors.Default;
            }
        }
开发者ID:phongferrari,项目名称:source-code-nama,代码行数:55,代码来源:Frm_Credit_Process_ThucNo.cs


示例14: btProcess_Click

        private void btProcess_Click( object sender, EventArgs e )
        {
            try
            {
                string type = cbb_type.Text.Trim ( ); //2015-10-20 (1)
                this.Cursor = Cursors.WaitCursor;

                string name = Businessbp.executedb.owner + "pro_auto_payment";
                //string[] InParaName = new string[1] { "u_create" };//old 2015-10-20 (1)
                string[] InParaName = new string[1] { "u_create" };//2015-10-20 (1)
                string[] OutParaName = new string[2] { "Result_out", "Msg_out" };
                //OleDbType[] InParaType = new OleDbType[1] { OleDbType.VarChar };//old 2015-10-20 (1)
                OleDbType[] InParaType = new OleDbType[1] { OleDbType.VarChar };//2015-10-20 (1)
                OleDbType[] OutParaType = new OleDbType[2] { OleDbType.Numeric, OleDbType.VarChar };

                //string[] InParaValues = new string[1] { Businessbp.executedb.Usrid };//old 2015-10-20 (1)
                string[] InParaValues = new string[1] { Businessbp.executedb.Usrid };// 2015-10-20 (1)
                string[] OutParaValues = new string[2];
                for (int i = 0; i < 2; i++)
                    OutParaValues[i] = "";
                int[] OutParaSize = new int[2] { 0, 300 };
                string err = "";
                Businessbp.executedb.ExecuteProcELECTRA ( name, InParaName, InParaType, InParaValues, OutParaName, OutParaType, OutParaSize, ref  OutParaValues, ref  err );
                if (err != "")
                {
                    MessageBox.Show ( err );
                    this.Cursor = Cursors.Default;
                }
                else
                {
                    int Result_out = Int32.Parse ( OutParaValues[0].ToString ( ) );
                    string Emsg_out = OutParaValues[1].ToString ( );
                    if (Result_out != 1)//Lỗi
                    {
                        MessageBox.Show ( Emsg_out );
                        this.Cursor = Cursors.Default;
                        return;
                    }
                    else
                    {
                        //Xu ly hach toan
                        HachToan ( false );
                        LoadData ( );
                        tbStatus.Text = "Process successfull!!!";
                        this.Cursor = Cursors.Default;
                    }
                }

            }
            catch (Exception ex)
            {
                MessageBox.Show ( ex.Message );
            }
        }
开发者ID:phongferrari,项目名称:auto-payment,代码行数:54,代码来源:Frm_Credit_Process_Auto_Payment.cs


示例15: SetParameterValue

 void SetParameterValue(OleDbParameterCollection Params, object value, OleDbType type)
 {
     if (value != null)
     {
         Params.Add("?", type).Value = value;
     }
     else
     {
         Params.AddWithValue("?", DBNull.Value);
     }
 }
开发者ID:BGCX262,项目名称:zsicam-svn-to-git,代码行数:11,代码来源:test.cs


示例16: button1_Click

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                string sql = "", err1 = "";
                DataTable dt;

                string cycle = cbCycle.SelectedValue.ToString().Trim();
                string date_process = dateTimePicker1.Text;
                string name = Businessbp.executedb.owner + "nab_proc_printbillcr";
               // (cycle in varchar2, indate in varchar2, Result_out out number,
              //Emsg_out out varchar2) is

                string[] InParaName = new string[2] { "cycle", "indate" };
                string[] OutParaName = new string[2] { "Result_out", "Emsg_out" };
                OleDbType[] InParaType = new OleDbType[2] { OleDbType.VarChar, OleDbType.VarChar };
                OleDbType[] OutParaType = new OleDbType[2] { OleDbType.Numeric, OleDbType.VarChar };

                string[] InParaValues = new string[2] { cycle, date_process };
                string[] OutParaValues = new string[2];
                for (int i = 0; i < 2; i++)
                    OutParaValues[i] = "";
                int[] OutParaSize = new int[2] { 0, 300 };
                string err = "";
                Businessbp.executedb.ExecuteProcELECTRA(name, InParaName, InParaType, InParaValues, OutParaName, OutParaType, OutParaSize, ref  OutParaValues, ref  err);
                if (err != "")
                {
                    MessageBox.Show(err);
                    this.Cursor = Cursors.Default;
                }
                else
                {
                    int Result_out = Int32.Parse(OutParaValues[0].ToString());
                    string Emsg_out = OutParaValues[1].ToString();
                    if (Result_out != 1)
                    {
                        MessageBox.Show(Emsg_out);
                        this.Cursor = Cursors.Default;
                        return;
                    }
                    else
                    {
                        MessageBox.Show("Process successful");
                    }
                }
                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
开发者ID:phongferrari,项目名称:source-code-nama,代码行数:53,代码来源:Frm_Credit_Billing_Process.cs


示例17: CreateParameter

        private static IDataParameter CreateParameter(string parameterName, object parameterValue,
            OleDbType dbType)
        {
            parameterValue = parameterValue ?? DBNull.Value;

            if (parameterValue is DBNull)
            {
                return new OleDbParameter(parameterName, dbType);
            }

            return new OleDbParameter(parameterName, parameterValue);
        } 
开发者ID:jasenkin,项目名称:Jasen.Framework,代码行数:12,代码来源:OledbSqlBuilder.cs


示例18: MakeParam

 public OleDbParameter MakeParam(string ParamName, OleDbType DbType, Int32 Size, ParameterDirection Direction, object Value)
 {
     OleDbParameter param;
     if (Size > 0)
         param = new OleDbParameter(ParamName, DbType, Size);
     else
         param = new OleDbParameter(ParamName, DbType);
     param.Direction = Direction;
     if (!(Direction == ParameterDirection.Output && Value == null))
         param.Value = Value;
     return param;
 }
开发者ID:huoxudong125,项目名称:DotNet,代码行数:12,代码来源:DbHelperService.cs


示例19: bt_Authorize_Click

        private void bt_Authorize_Click(object sender, EventArgs e)
        {
            string in_parameter = "";
            string err = "";
            string out_rc = "", out_msg_err = "", out_other_info = "";
            const int count_inval = 1;
            const int count_outval = 3;
            in_parameter = "";
            in_parameter += "<cr_account_number>" + tb_AccNo.Text.Trim() + "</cr_account_number>";
            in_parameter += "<user_id>" + Businessbp.executedb.Usrid + "</user_id>";

            string name = Businessbp.executedb.owner + "nab_installment.Over_Limit_Installment";
            string[] InParaName = new string[count_inval] { "in_parameter" };
            OleDbType[] InParaType = new OleDbType[count_inval] { OleDbType.VarChar };
            string[] InParaValues = new string[count_inval] { in_parameter };
            string[] OutParaName = new string[count_outval] { "out_rc", "out_msg_err", "out_other_info" };
            OleDbType[] OutParaType = new OleDbType[count_outval] { OleDbType.VarChar, OleDbType.VarChar, OleDbType.VarChar };
            int[] OutParaSize = new int[count_outval] { 2, 100, 9999 };
            string[] OutParaValues = new string[count_outval];
            err = "";
            Businessbp.executedb.ExecuteProcELECTRA(name, InParaName, InParaType, InParaValues, OutParaName, OutParaType, OutParaSize, ref  OutParaValues, ref  err);
            if (err != "")
            {
                MessageBox.Show(err);
            }
            else
            {
                out_rc = OutParaValues[0].ToString();
                out_msg_err = OutParaValues[1].ToString();
                out_other_info = OutParaValues[2].ToString();

                if (out_rc != "00")
                {
                    MessageBox.Show(out_msg_err);
                }
                else
                {
                    tb_AccNo.Enabled = false;
                    string batch_nbr = "";
                    batch_nbr = out_other_info.Substring(out_other_info.IndexOf("<batch_nbr>") + "<batch_nbr>".Length, out_other_info.IndexOf("</batch_nbr>") - (out_other_info.IndexOf("<batch_nbr>") + "<batch_nbr>".Length));
                    if (batch_nbr == "")
                        MessageBox.Show("No batch open!!");
                    else
                    {
                        lb_Success.Text = Count_Success_Fail(Int32.Parse(batch_nbr), "Y").ToString();
                        lb_Fail.Text = Count_Success_Fail(Int32.Parse(batch_nbr), "Z").ToString();
                        Load_Data_After(batch_nbr);
                        MessageBox.Show("Process Done!!!");
                    }
                }
            }
        }
开发者ID:phongferrari,项目名称:source-code-nama,代码行数:52,代码来源:Frm_Installment_Over_Limit_Authorize.cs


示例20: IntelWebField

 public IntelWebField(string fieldname, OleDbType fieldtype, int fieldsize, byte fieldprecision, byte fieldscale, DataRowVersion fieldversion, bool isnullable, object fieldvalue)
 {
     this.name = fieldname;
     this.type = fieldtype;
     this.size = fieldsize;
     this.precision = fieldprecision;
     this.scale = fieldscale;
     this.version = fieldversion;
     this.nullable = isnullable;
     _fieldValue = fieldvalue;
     this.previousValue = fieldValue;
     _isdirty = false;
 }
开发者ID:pravastech,项目名称:IntelWebMap,代码行数:13,代码来源:IntelWebField.cs



注:本文中的OleDbType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Omni类代码示例发布时间:2022-05-24
下一篇:
C# OidGroup类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap