亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sqlhelper.cs

?? C#代碼查看Sqlserver等不同數據庫的源代碼
?? CS
?? 第 1 頁 / 共 5 頁
字號:
			
			// detach the SqlParameters from the command object, so they can be used again.
			cmd.Parameters.Clear();
			return retval;
		}

		/// <summary>
		/// Execute a stored procedure via a SqlCommand (that returns no resultset) against the specified SqlConnection 
		/// using the provided parameter values.  This method will query the database to discover the parameters for the 
		/// stored procedure (the first time each stored procedure is called), and assign the values based on parameter order.
		/// </summary>
		/// <remarks>
		/// This method provides no access to output parameters or the stored procedure's return value parameter.
		/// 
		/// e.g.:  
		///  int result = ExecuteNonQuery(conn, "PublishOrders", 24, 36);
		/// </remarks>
		/// <param name="connection">a valid SqlConnection</param>
		/// <param name="spName">the name of the stored procedure</param>
		/// <param name="parameterValues">an array of objects to be assigned as the input values of the stored procedure</param>
		/// <returns>an int representing the number of rows affected by the command</returns>
		public static int ExecuteNonQuery(SqlConnection connection, string spName, params object[] parameterValues)
		{
			//if we receive parameter values, we need to figure out where they go
			if ((parameterValues != null) && (parameterValues.Length > 0)) 
			{
				//pull the parameters for this stored procedure from the parameter cache (or discover them & populate the cache)
				SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connection.ConnectionString, spName);

				//assign the provided values to these parameters based on parameter order
				AssignParameterValues(commandParameters, parameterValues);

				//call the overload that takes an array of SqlParameters
				return ExecuteNonQuery(connection, CommandType.StoredProcedure, spName, commandParameters);
			}
				//otherwise we can just call the SP without params
			else 
			{
				return ExecuteNonQuery(connection, CommandType.StoredProcedure, spName);
			}
		}

		/// <summary>
		/// Execute a SqlCommand (that returns no resultset and takes no parameters) against the provided SqlTransaction. 
		/// </summary>
		/// <remarks>
		/// e.g.:  
		///  int result = ExecuteNonQuery(trans, CommandType.StoredProcedure, "PublishOrders");
		/// </remarks>
		/// <param name="transaction">a valid SqlTransaction</param>
		/// <param name="commandType">the CommandType (stored procedure, text, etc.)</param>
		/// <param name="commandText">the stored procedure name or T-SQL command</param>
		/// <returns>an int representing the number of rows affected by the command</returns>
		public static int ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, string commandText)
		{
			//pass through the call providing null for the set of SqlParameters
			return ExecuteNonQuery(transaction, commandType, commandText, (SqlParameter[])null);
		}

		/// <summary>
		/// Execute a SqlCommand (that returns no resultset) against the specified SqlTransaction
		/// using the provided parameters.
		/// </summary>
		/// <remarks>
		/// e.g.:  
		///  int result = ExecuteNonQuery(trans, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24));
		/// </remarks>
		/// <param name="transaction">a valid SqlTransaction</param>
		/// <param name="commandType">the CommandType (stored procedure, text, etc.)</param>
		/// <param name="commandText">the stored procedure name or T-SQL command</param>
		/// <param name="commandParameters">an array of SqlParamters used to execute the command</param>
		/// <returns>an int representing the number of rows affected by the command</returns>
		public static int ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, string commandText, params SqlParameter[] commandParameters)
		{
			//create a command and prepare it for execution
			SqlCommand cmd = new SqlCommand();
			PrepareCommand(cmd, transaction.Connection, transaction, commandType, commandText, commandParameters);
			
			//finally, execute the command.
			int retval = cmd.ExecuteNonQuery();
			
			// detach the SqlParameters from the command object, so they can be used again.
			cmd.Parameters.Clear();
			return retval;
		}

		/// <summary>
		/// Execute a stored procedure via a SqlCommand (that returns no resultset) against the specified 
		/// SqlTransaction using the provided parameter values.  This method will query the database to discover the parameters for the 
		/// stored procedure (the first time each stored procedure is called), and assign the values based on parameter order.
		/// </summary>
		/// <remarks>
		/// This method provides no access to output parameters or the stored procedure's return value parameter.
		/// 
		/// e.g.:  
		///  int result = ExecuteNonQuery(conn, trans, "PublishOrders", 24, 36);
		/// </remarks>
		/// <param name="transaction">a valid SqlTransaction</param>
		/// <param name="spName">the name of the stored procedure</param>
		/// <param name="parameterValues">an array of objects to be assigned as the input values of the stored procedure</param>
		/// <returns>an int representing the number of rows affected by the command</returns>
		public static int ExecuteNonQuery(SqlTransaction transaction, string spName, params object[] parameterValues)
		{
			//if we receive parameter values, we need to figure out where they go
			if ((parameterValues != null) && (parameterValues.Length > 0)) 
			{
				//pull the parameters for this stored procedure from the parameter cache (or discover them & populate the cache)
				SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(transaction.Connection.ConnectionString, spName);

				//assign the provided values to these parameters based on parameter order
				AssignParameterValues(commandParameters, parameterValues);

				//call the overload that takes an array of SqlParameters
				return ExecuteNonQuery(transaction, CommandType.StoredProcedure, spName, commandParameters);
			}
				//otherwise we can just call the SP without params
			else 
			{
				return ExecuteNonQuery(transaction, CommandType.StoredProcedure, spName);
			}
		}


		#endregion ExecuteNonQuery

		#region ExecuteDataSet

		/// <summary>
		/// Execute a SqlCommand (that returns a resultset and takes no parameters) against the database specified in 
		/// the connection string. 
		/// </summary>
		/// <remarks>
		/// e.g.:  
		///  DataSet ds = ExecuteDataset(connString, CommandType.StoredProcedure, "GetOrders");
		/// </remarks>
		/// <param name="connectionString">a valid connection string for a SqlConnection</param>
		/// <param name="commandType">the CommandType (stored procedure, text, etc.)</param>
		/// <param name="commandText">the stored procedure name or T-SQL command</param>
		/// <returns>a dataset containing the resultset generated by the command</returns>
		public static DataSet ExecuteDataset(string connectionString, CommandType commandType, string commandText)
		{
			//pass through the call providing null for the set of SqlParameters
			return ExecuteDataset(connectionString, commandType, commandText, (SqlParameter[])null);
		}

		/// <summary>
		/// Execute a SqlCommand (that returns a resultset) against the database specified in the connection string 
		/// using the provided parameters.
		/// </summary>
		/// <remarks>
		/// e.g.:  
		///  DataSet ds = ExecuteDataset(connString, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24));
		/// </remarks>
		/// <param name="connectionString">a valid connection string for a SqlConnection</param>
		/// <param name="commandType">the CommandType (stored procedure, text, etc.)</param>
		/// <param name="commandText">the stored procedure name or T-SQL command</param>
		/// <param name="commandParameters">an array of SqlParamters used to execute the command</param>
		/// <returns>a dataset containing the resultset generated by the command</returns>
		public static DataSet ExecuteDataset(string connectionString, CommandType commandType, string commandText, params SqlParameter[] commandParameters)
		{
			//create & open a SqlConnection, and dispose of it after we are done.
			using (SqlConnection cn = new SqlConnection(connectionString))
			{
				cn.Open();

				//call the overload that takes a connection in place of the connection string
				return ExecuteDataset(cn, commandType, commandText, commandParameters);
			}
		}

		/// <summary>
		/// Execute a stored procedure via a SqlCommand (that returns a resultset) against the database specified in 
		/// the connection string using the provided parameter values.  This method will query the database to discover the parameters for the 
		/// stored procedure (the first time each stored procedure is called), and assign the values based on parameter order.
		/// </summary>
		/// <remarks>
		/// This method provides no access to output parameters or the stored procedure's return value parameter.
		/// 
		/// e.g.:  
		///  DataSet ds = ExecuteDataset(connString, "GetOrders", 24, 36);
		/// </remarks>
		/// <param name="connectionString">a valid connection string for a SqlConnection</param>
		/// <param name="spName">the name of the stored procedure</param>
		/// <param name="parameterValues">an array of objects to be assigned as the input values of the stored procedure</param>
		/// <returns>a dataset containing the resultset generated by the command</returns>
		public static DataSet ExecuteDataset(string connectionString, string spName, params object[] parameterValues)
		{
			//if we receive parameter values, we need to figure out where they go
			if ((parameterValues != null) && (parameterValues.Length > 0)) 
			{
				//pull the parameters for this stored procedure from the parameter cache (or discover them & populate the cache)
				SqlParameter[] commandParameters = SqlHelperParameterCache.GetSpParameterSet(connectionString, spName);

				//assign the provided values to these parameters based on parameter order
				AssignParameterValues(commandParameters, parameterValues);

				//call the overload that takes an array of SqlParameters
				return ExecuteDataset(connectionString, CommandType.StoredProcedure, spName, commandParameters);
			}
				//otherwise we can just call the SP without params
			else 
			{
				return ExecuteDataset(connectionString, CommandType.StoredProcedure, spName);
			}
		}

		/// <summary>
		/// Execute a SqlCommand (that returns a resultset and takes no parameters) against the provided SqlConnection. 
		/// </summary>
		/// <remarks>
		/// e.g.:  
		///  DataSet ds = ExecuteDataset(conn, CommandType.StoredProcedure, "GetOrders");
		/// </remarks>
		/// <param name="connection">a valid SqlConnection</param>
		/// <param name="commandType">the CommandType (stored procedure, text, etc.)</param>
		/// <param name="commandText">the stored procedure name or T-SQL command</param>
		/// <returns>a dataset containing the resultset generated by the command</returns>
		public static DataSet ExecuteDataset(SqlConnection connection, CommandType commandType, string commandText)
		{
			//pass through the call providing null for the set of SqlParameters
			return ExecuteDataset(connection, commandType, commandText, (SqlParameter[])null);
		}
		
		/// <summary>
		/// Execute a SqlCommand (that returns a resultset) against the specified SqlConnection 
		/// using the provided parameters.
		/// </summary>
		/// <remarks>
		/// e.g.:  
		///  DataSet ds = ExecuteDataset(conn, CommandType.StoredProcedure, "GetOrders", new SqlParameter("@prodid", 24));
		/// </remarks>
		/// <param name="connection">a valid SqlConnection</param>
		/// <param name="commandType">the CommandType (stored procedure, text, etc.)</param>
		/// <param name="commandText">the stored procedure name or T-SQL command</param>
		/// <param name="commandParameters">an array of SqlParamters used to execute the command</param>
		/// <returns>a dataset containing the resultset generated by the command</returns>
		public static DataSet ExecuteDataset(SqlConnection connection, CommandType commandType, string commandText, params SqlParameter[] commandParameters)
		{
			//create a command and prepare it for execution
			SqlCommand cmd = new SqlCommand();
			PrepareCommand(cmd, connection, (SqlTransaction)null, commandType, commandText, commandParameters);
			
			//create the DataAdapter & DataSet
			SqlDataAdapter da = new SqlDataAdapter(cmd);
			DataSet ds = new DataSet();

			//fill the DataSet using default values for DataTable names, etc.
			da.Fill(ds);
			
			// detach the SqlParameters from the command object, so they can be used again.			
			cmd.Parameters.Clear();
			
			//return the dataset
			return ds;						
		}
		
		/// <summary>
		/// Execute a stored procedure via a SqlCommand (that returns a resultset) against the specified SqlConnection 
		/// using the provided parameter values.  This method will query the database to discover the parameters for the 
		/// stored procedure (the first time each stored procedure is called), and assign the values based on parameter order.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产经典欧美精品| 欧美日韩一卡二卡| 婷婷久久综合九色综合绿巨人| 欧美大片日本大片免费观看| 99精品视频一区二区三区| 免费人成黄页网站在线一区二区| 欧美国产乱子伦| 日韩欧美国产不卡| 欧美性受极品xxxx喷水| 在线观看精品一区| 国产精品99久久久久久似苏梦涵| 午夜天堂影视香蕉久久| 国产精品乱人伦一区二区| 精品区一区二区| 69精品人人人人| 日本高清视频一区二区| 成人性生交大片免费看中文 | 欧美成人a∨高清免费观看| 91老师片黄在线观看| 粉嫩aⅴ一区二区三区四区五区| 天天色天天操综合| 亚洲国产成人高清精品| 亚洲欧洲99久久| 国产三级精品三级| 久久在线免费观看| 欧美一区二区三区视频免费 | 欧美久久一二三四区| 91国产成人在线| www.亚洲精品| 大桥未久av一区二区三区中文| 精品一区二区免费看| 日本午夜一本久久久综合| 亚瑟在线精品视频| 亚洲一级二级三级| 亚洲一区在线观看视频| 一区二区三区在线影院| 亚洲四区在线观看| **网站欧美大片在线观看| 国产精品视频一二| 国产精品欧美久久久久无广告| 精品国产伦理网| 51精品秘密在线观看| 欧美一区二视频| 在线不卡欧美精品一区二区三区| 欧美日韩一二三区| 欧美日本一区二区三区| 欧美高清精品3d| 欧美一级日韩免费不卡| 欧美一级黄色录像| 日韩你懂的在线观看| 久久久综合视频| 国产精品麻豆视频| 亚洲精品成人在线| 亚洲不卡在线观看| 久久 天天综合| 国产精品一区三区| 精品毛片乱码1区2区3区| 欧美精品一区二区在线播放| 久久综合久久鬼色| 国产精品你懂的在线欣赏| 国产精品不卡一区| 亚洲综合在线第一页| 天堂一区二区在线| 国产最新精品免费| 99r国产精品| 欧美猛男超大videosgay| 91精品国产免费| 久久久国产精品午夜一区ai换脸| 中文av一区二区| 午夜精品视频在线观看| 蓝色福利精品导航| 国产不卡在线播放| 欧美日韩午夜影院| 久久综合久久久久88| 最新日韩在线视频| 视频精品一区二区| 国产黑丝在线一区二区三区| 91色九色蝌蚪| 欧美一级二级在线观看| 国产欧美日韩另类一区| 亚洲成人动漫精品| 欧美精品在线观看播放| 久久久综合精品| 亚洲国产日韩a在线播放| 国产精品一区二区视频| 国产馆精品极品| 欧美色老头old∨ideo| 日韩欧美激情一区| 综合电影一区二区三区| 日韩av一区二区三区四区| 不卡的看片网站| 日韩欧美色综合| 1024成人网| 韩国成人在线视频| 欧美日韩免费观看一区三区| 久久精品免视看| 日本欧美一区二区在线观看| av高清不卡在线| 久久这里只精品最新地址| 亚洲大片免费看| 99精品在线免费| 奇米一区二区三区| 99久久亚洲一区二区三区青草 | 久久午夜羞羞影院免费观看| 一区二区视频在线| 国产成人av福利| 欧美电视剧免费观看| 亚洲一区二区av在线| 99在线热播精品免费| 欧美成人一区二区三区片免费 | 亚洲色图欧美在线| 国产成人免费视频精品含羞草妖精 | 91视视频在线直接观看在线看网页在线看 | 午夜国产不卡在线观看视频| av不卡免费电影| 26uuu久久天堂性欧美| 视频一区视频二区中文字幕| 91在线国产观看| 中文字幕免费不卡在线| 久久激情综合网| 91精品国产免费| 丝袜亚洲另类丝袜在线| 欧美亚洲一区三区| 亚洲欧洲在线观看av| 国产成人av一区二区| 久久精品一区二区三区不卡| 精品一区二区免费视频| 精品国产亚洲一区二区三区在线观看| 丁香另类激情小说| 久久伊99综合婷婷久久伊| 日韩av在线播放中文字幕| 欧美顶级少妇做爰| 爽好多水快深点欧美视频| 欧美日韩精品欧美日韩精品 | 在线亚洲一区二区| 亚洲色图制服诱惑| 91麻豆免费看| 亚洲精品水蜜桃| 在线精品视频小说1| 一区二区免费在线| 在线观看亚洲精品| 亚洲成人综合视频| 欧美日本一区二区三区| 日本va欧美va精品| 精品日本一线二线三线不卡| 国产一区二区精品久久91| 国产亚洲精品中文字幕| 成人一区二区三区视频在线观看 | 秋霞成人午夜伦在线观看| 日韩欧美一级二级三级| 精品一区二区久久久| 国产欧美日韩在线看| jlzzjlzz亚洲日本少妇| 亚洲精品福利视频网站| 欧美日韩国产123区| 久久66热偷产精品| 欧美国产日韩精品免费观看| 99国产精品久| 无码av中文一区二区三区桃花岛| 日韩一区二区精品| 成人免费视频网站在线观看| 亚洲丝袜另类动漫二区| 欧美在线免费视屏| 捆绑紧缚一区二区三区视频| 中文字幕乱码久久午夜不卡| 91搞黄在线观看| 久久不见久久见中文字幕免费| 久久丝袜美腿综合| 色琪琪一区二区三区亚洲区| 日韩国产欧美一区二区三区| 国产日韩在线不卡| 欧美揉bbbbb揉bbbbb| 激情欧美一区二区| 亚洲三级视频在线观看| 7777精品伊人久久久大香线蕉超级流畅| 久久国产乱子精品免费女| 国产精品第一页第二页第三页| 欧美亚洲国产一区在线观看网站| 麻豆成人久久精品二区三区小说| 日本一区二区三区久久久久久久久不 | 亚洲成人av福利| 国产人妖乱国产精品人妖| 欧美三级电影一区| 国产超碰在线一区| 无码av免费一区二区三区试看 | eeuss国产一区二区三区| 性感美女极品91精品| 欧美经典一区二区三区| 欧美日韩日日摸| 风间由美性色一区二区三区| 亚洲国产一区视频| 欧美韩国日本综合| 欧美一级专区免费大片| 色琪琪一区二区三区亚洲区| 国产乱人伦偷精品视频免下载| 亚洲自拍偷拍麻豆| 国产精品国产馆在线真实露脸| 91精品欧美综合在线观看最新| 色哟哟亚洲精品| 国产精品69毛片高清亚洲|