Method | Description | |
---|---|---|
CreateCommand ( |
Simplify the creation of a Sql command object by allowing a stored procedure and optional parameters to be provided e.g.: SqlCommand command = CreateCommand(conn, "AddCustomer", "CustomerID", "CustomerName"); |
|
ExecuteDataset ( |
Execute a SqlCommand (that returns a resultset and takes no parameters) against the provided SqlConnection. e.g.: DataSet ds = ExecuteDataset(conn, CommandType.StoredProcedure, "GetOrders"); |
|
ExecuteDataset ( |
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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: DataSet ds = ExecuteDataset(conn, "GetOrders", 24, 36); |
|
ExecuteDataset ( |
Execute a SqlCommand (that returns a resultset and takes no parameters) against the provided SqlTransaction. e.g.: DataSet ds = ExecuteDataset(trans, CommandType.StoredProcedure, "GetOrders"); |
|
ExecuteDataset ( |
Execute a stored procedure via a SqlCommand (that returns a 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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: DataSet ds = ExecuteDataset(trans, "GetOrders", 24, 36); |
|
ExecuteDataset ( string connectionString, CommandType commandType, string commandText ) : |
Execute a SqlCommand (that returns a resultset and takes no parameters) against the database specified in the connection string. e.g.: DataSet ds = ExecuteDataset(connString, CommandType.StoredProcedure, "GetOrders"); |
|
ExecuteDataset ( string connectionString, string spName ) : |
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. 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); |
|
ExecuteDatasetTypedParams ( |
Execute a stored procedure via a SqlCommand (that returns a resultset) against the specified SqlConnection using the dataRow column values as the store procedure's parameters 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 row values.
|
|
ExecuteDatasetTypedParams ( |
Execute a stored procedure via a SqlCommand (that returns a resultset) against the specified SqlTransaction using the dataRow column values as the stored procedure's parameters 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 row values.
|
|
ExecuteDatasetTypedParams ( string connectionString, String spName, |
Execute a stored procedure via a SqlCommand (that returns a resultset) against the database specified in the connection string using the dataRow column values as the stored procedure's parameters 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 row values.
|
|
ExecuteNonQuery ( |
Execute a SqlCommand (that returns no resultset and takes no parameters) against the provided SqlConnection. e.g.: int result = ExecuteNonQuery(conn, CommandType.StoredProcedure, "PublishOrders"); |
|
ExecuteNonQuery ( |
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. 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); |
|
ExecuteNonQuery ( |
Execute a SqlCommand (that returns no resultset and takes no parameters) against the provided SqlTransaction. e.g.: int result = ExecuteNonQuery(trans, CommandType.StoredProcedure, "PublishOrders"); |
|
ExecuteNonQuery ( |
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. 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); |
|
ExecuteNonQuery ( string connectionString, CommandType commandType, string commandText ) : int |
Execute a SqlCommand (that returns no resultset and takes no parameters) against the database specified in the connection string e.g.: int result = ExecuteNonQuery(connString, CommandType.StoredProcedure, "PublishOrders"); |
|
ExecuteNonQuery ( string connectionString, string spName ) : int |
Execute a stored procedure via a SqlCommand (that returns no 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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: int result = ExecuteNonQuery(connString, "PublishOrders", 24, 36); |
|
ExecuteNonQueryTypedParams ( |
Execute a stored procedure via a SqlCommand (that returns no resultset) against the specified SqlConnection using the dataRow column values as the stored procedure's parameters 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 row values.
|
|
ExecuteNonQueryTypedParams ( |
Execute a stored procedure via a SqlCommand (that returns no resultset) against the specified SqlTransaction using the dataRow column values as the stored procedure's parameters 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 row values.
|
|
ExecuteNonQueryTypedParams ( String connectionString, String spName, |
Execute a stored procedure via a SqlCommand (that returns no resultset) against the database specified in the connection string using the dataRow column values as the stored procedure's parameters 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 row values.
|
|
ExecuteReader ( |
Execute a SqlCommand (that returns a resultset and takes no parameters) against the provided SqlConnection. e.g.: SqlDataReader dr = ExecuteReader(conn, CommandType.StoredProcedure, "GetOrders"); |
|
ExecuteReader ( |
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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: SqlDataReader dr = ExecuteReader(conn, "GetOrders", 24, 36); |
|
ExecuteReader ( |
Execute a SqlCommand (that returns a resultset and takes no parameters) against the provided SqlTransaction. e.g.: SqlDataReader dr = ExecuteReader(trans, CommandType.StoredProcedure, "GetOrders"); |
|
ExecuteReader ( |
Execute a stored procedure via a SqlCommand (that returns a 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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: SqlDataReader dr = ExecuteReader(trans, "GetOrders", 24, 36); |
|
ExecuteReader ( string connectionString, CommandType commandType, string commandText ) : System.Data.SqlClient.SqlDataReader |
Execute a SqlCommand (that returns a resultset and takes no parameters) against the database specified in the connection string. e.g.: SqlDataReader dr = ExecuteReader(connString, CommandType.StoredProcedure, "GetOrders"); |
|
ExecuteReader ( string connectionString, string spName ) : System.Data.SqlClient.SqlDataReader |
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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: SqlDataReader dr = ExecuteReader(connString, "GetOrders", 24, 36); |
|
ExecuteReaderTypedParams ( |
Execute a stored procedure via a SqlCommand (that returns a resultset) against the specified SqlConnection using the dataRow column values as the stored procedure's parameters 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.
|
|
ExecuteReaderTypedParams ( |
Execute a stored procedure via a SqlCommand (that returns a resultset) against the specified SqlTransaction using the dataRow column values as the stored procedure's parameters 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.
|
|
ExecuteReaderTypedParams ( String connectionString, String spName, |
Execute a stored procedure via a SqlCommand (that returns a resultset) against the database specified in the connection string using the dataRow column values as the stored procedure's parameters 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.
|
|
ExecuteScalar ( |
Execute a SqlCommand (that returns a 1x1 resultset and takes no parameters) against the provided SqlConnection. e.g.: int orderCount = (int)ExecuteScalar(conn, CommandType.StoredProcedure, "GetOrderCount"); |
|
ExecuteScalar ( |
Execute a stored procedure via a SqlCommand (that returns a 1x1 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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: int orderCount = (int)ExecuteScalar(conn, "GetOrderCount", 24, 36); |
|
ExecuteScalar ( |
Execute a SqlCommand (that returns a 1x1 resultset and takes no parameters) against the provided SqlTransaction. e.g.: int orderCount = (int)ExecuteScalar(trans, CommandType.StoredProcedure, "GetOrderCount"); |
|
ExecuteScalar ( |
Execute a stored procedure via a SqlCommand (that returns a 1x1 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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: int orderCount = (int)ExecuteScalar(trans, "GetOrderCount", 24, 36); |
|
ExecuteScalar ( string connectionString, CommandType commandType, string commandText ) : object |
Execute a SqlCommand (that returns a 1x1 resultset and takes no parameters) against the database specified in the connection string. e.g.: int orderCount = (int)ExecuteScalar(connString, CommandType.StoredProcedure, "GetOrderCount"); |
|
ExecuteScalar ( string connectionString, string spName ) : object |
Execute a stored procedure via a SqlCommand (that returns a 1x1 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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: int orderCount = (int)ExecuteScalar(connString, "GetOrderCount", 24, 36); |
|
ExecuteScalarTypedParams ( |
Execute a stored procedure via a SqlCommand (that returns a 1x1 resultset) against the specified SqlConnection using the dataRow column values as the stored procedure's parameters 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.
|
|
ExecuteScalarTypedParams ( |
Execute a stored procedure via a SqlCommand (that returns a 1x1 resultset) against the specified SqlTransaction using the dataRow column values as the stored procedure's parameters 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.
|
|
ExecuteScalarTypedParams ( String connectionString, String spName, |
Execute a stored procedure via a SqlCommand (that returns a 1x1 resultset) against the database specified in the connection string using the dataRow column values as the stored procedure's parameters 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.
|
|
ExecuteXmlReader ( |
Execute a SqlCommand (that returns a resultset and takes no parameters) against the provided SqlConnection. e.g.: XmlReader r = ExecuteXmlReader(conn, CommandType.StoredProcedure, "GetOrders"); |
|
ExecuteXmlReader ( |
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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: XmlReader r = ExecuteXmlReader(conn, "GetOrders", 24, 36); |
|
ExecuteXmlReader ( |
Execute a SqlCommand (that returns a resultset and takes no parameters) against the provided SqlTransaction. e.g.: XmlReader r = ExecuteXmlReader(trans, CommandType.StoredProcedure, "GetOrders"); |
|
ExecuteXmlReader ( |
Execute a stored procedure via a SqlCommand (that returns a 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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: XmlReader r = ExecuteXmlReader(trans, "GetOrders", 24, 36); |
|
ExecuteXmlReaderTypedParams ( |
Execute a stored procedure via a SqlCommand (that returns a resultset) against the specified SqlConnection using the dataRow column values as the stored procedure's parameters 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.
|
|
ExecuteXmlReaderTypedParams ( |
Execute a stored procedure via a SqlCommand (that returns a resultset) against the specified SqlTransaction using the dataRow column values as the stored procedure's parameters 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.
|
|
FillDataset ( |
Execute a SqlCommand (that returns a resultset and takes no parameters) against the provided SqlConnection. e.g.: FillDataset(conn, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}); |
|
FillDataset ( |
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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: FillDataset(conn, "GetOrders", ds, new string[] {"orders"}, 24, 36); |
|
FillDataset ( |
Execute a SqlCommand (that returns a resultset and takes no parameters) against the provided SqlTransaction. e.g.: FillDataset(trans, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}); |
|
FillDataset ( |
Execute a stored procedure via a SqlCommand (that returns a 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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: FillDataset(trans, "GetOrders", ds, new string[]{"orders"}, 24, 36); |
|
FillDataset ( string connectionString, CommandType commandType, string commandText, |
Execute a SqlCommand (that returns a resultset and takes no parameters) against the database specified in the connection string. e.g.: FillDataset(connString, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}); |
|
FillDataset ( string connectionString, string spName, |
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. This method provides no access to output parameters or the stored procedure's return value parameter. e.g.: FillDataset(connString, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}, 24); |
|
TableValuedToDB ( string _sqlConnStr, |
批量插入
|
|
UpdateDataset ( |
Executes the respective command for each inserted, updated, or deleted row in the DataSet. e.g.: UpdateDataset(conn, insertCommand, deleteCommand, updateCommand, dataSet, "Order"); |
Method | Description | |
---|---|---|
AssignParameterValues ( |
This method assigns dataRow column values to an array of SqlParameters
|
|
AssignParameterValues ( |
This method assigns an array of values to an array of SqlParameters
|
|
AttachParameters ( |
This method is used to attach array of SqlParameters to a SqlCommand. This method will assign a value of DbNull to any parameter with a direction of InputOutput and a value of null. This behavior will prevent default values from being used, but this will be the less common case than an intended pure output parameter (derived as InputOutput) where the user provided no input value.
|
|
ExecuteReader ( |
Create and prepare a SqlCommand, and call ExecuteReader with the appropriate CommandBehavior. If we created and opened the connection, we want the connection to be closed when the DataReader is closed. If the caller provided the connection, we want to leave it to them to manage. |
|
FillDataset ( |
Private helper method that execute a SqlCommand (that returns a resultset) against the specified SqlTransaction and SqlConnection using the provided parameters. e.g.: FillDataset(conn, trans, CommandType.StoredProcedure, "GetOrders", ds, new string[] {"orders"}, new SqlParameter("@prodid", 24)); |
|
PrepareCommand ( |
This method opens (if necessary) and assigns a connection, transaction, command type and parameters to the provided command
|
|
SqlHelper ( ) : System |
public static CreateCommand ( |
||
connection | A valid SqlConnection object | |
spName | string | The name of the stored procedure |
return |
public static ExecuteDataset ( |
||
connection | A valid SqlConnection | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return |
public static ExecuteDataset ( |
||
connection | A valid SqlConnection | |
spName | string | The name of the stored procedure |
return |
public static ExecuteDataset ( |
||
transaction | A valid SqlTransaction | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return |
public static ExecuteDataset ( |
||
transaction | A valid SqlTransaction | |
spName | string | The name of the stored procedure |
return |
public static ExecuteDataset ( string connectionString, CommandType commandType, string commandText ) : |
||
connectionString | string | A valid connection string for a SqlConnection |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return |
public static ExecuteDataset ( string connectionString, string spName ) : |
||
connectionString | string | A valid connection string for a SqlConnection |
spName | string | The name of the stored procedure |
return |
public static ExecuteDatasetTypedParams ( |
||
connection | A valid SqlConnection object | |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return |
public static ExecuteDatasetTypedParams ( |
||
transaction | A valid SqlTransaction object | |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return |
public static ExecuteDatasetTypedParams ( string connectionString, String spName, |
||
connectionString | string | A valid connection string for a SqlConnection |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return |
public static ExecuteNonQuery ( |
||
connection | A valid SqlConnection | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return | int |
public static ExecuteNonQuery ( |
||
connection | A valid SqlConnection | |
spName | string | The name of the stored procedure |
return | int |
public static ExecuteNonQuery ( |
||
transaction | A valid SqlTransaction | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return | int |
public static ExecuteNonQuery ( |
||
transaction | A valid SqlTransaction | |
spName | string | The name of the stored procedure |
return | int |
public static ExecuteNonQuery ( string connectionString, CommandType commandType, string commandText ) : int | ||
connectionString | string | A valid connection string for a SqlConnection |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return | int |
public static ExecuteNonQuery ( string connectionString, string spName ) : int | ||
connectionString | string | A valid connection string for a SqlConnection |
spName | string | The name of the stored prcedure |
return | int |
public static ExecuteNonQueryTypedParams ( |
||
connection | A valid SqlConnection object | |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return | int |
public static ExecuteNonQueryTypedParams ( |
||
transaction | A valid SqlTransaction object | |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return | int |
public static ExecuteNonQueryTypedParams ( String connectionString, String spName, |
||
connectionString | String | A valid connection string for a SqlConnection |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return | int |
public static ExecuteReader ( |
||
connection | A valid SqlConnection | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return | System.Data.SqlClient.SqlDataReader |
public static ExecuteReader ( |
||
connection | A valid SqlConnection | |
spName | string | The name of the stored procedure |
return | System.Data.SqlClient.SqlDataReader |
public static ExecuteReader ( |
||
transaction | A valid SqlTransaction | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return | System.Data.SqlClient.SqlDataReader |
public static ExecuteReader ( |
||
transaction | A valid SqlTransaction | |
spName | string | The name of the stored procedure |
return | System.Data.SqlClient.SqlDataReader |
public static ExecuteReader ( string connectionString, CommandType commandType, string commandText ) : System.Data.SqlClient.SqlDataReader | ||
connectionString | string | A valid connection string for a SqlConnection |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return | System.Data.SqlClient.SqlDataReader |
public static ExecuteReader ( string connectionString, string spName ) : System.Data.SqlClient.SqlDataReader | ||
connectionString | string | A valid connection string for a SqlConnection |
spName | string | The name of the stored procedure |
return | System.Data.SqlClient.SqlDataReader |
public static ExecuteReaderTypedParams ( |
||
connection | A valid SqlConnection object | |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return | System.Data.SqlClient.SqlDataReader |
public static ExecuteReaderTypedParams ( |
||
transaction | A valid SqlTransaction object | |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return | System.Data.SqlClient.SqlDataReader |
public static ExecuteReaderTypedParams ( String connectionString, String spName, |
||
connectionString | String | A valid connection string for a SqlConnection |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return | System.Data.SqlClient.SqlDataReader |
public static ExecuteScalar ( |
||
connection | A valid SqlConnection | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return | object |
public static ExecuteScalar ( |
||
connection | A valid SqlConnection | |
spName | string | The name of the stored procedure |
return | object |
public static ExecuteScalar ( |
||
transaction | A valid SqlTransaction | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return | object |
public static ExecuteScalar ( |
||
transaction | A valid SqlTransaction | |
spName | string | The name of the stored procedure |
return | object |
public static ExecuteScalar ( string connectionString, CommandType commandType, string commandText ) : object | ||
connectionString | string | A valid connection string for a SqlConnection |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
return | object |
public static ExecuteScalar ( string connectionString, string spName ) : object | ||
connectionString | string | A valid connection string for a SqlConnection |
spName | string | The name of the stored procedure |
return | object |
public static ExecuteScalarTypedParams ( |
||
connection | A valid SqlConnection object | |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return | object |
public static ExecuteScalarTypedParams ( |
||
transaction | A valid SqlTransaction object | |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return | object |
public static ExecuteScalarTypedParams ( String connectionString, String spName, |
||
connectionString | String | A valid connection string for a SqlConnection |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return | object |
public static ExecuteXmlReader ( |
||
connection | A valid SqlConnection | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command using "FOR XML AUTO" |
return |
public static ExecuteXmlReader ( |
||
connection | A valid SqlConnection | |
spName | string | The name of the stored procedure using "FOR XML AUTO" |
return |
public static ExecuteXmlReader ( |
||
transaction | A valid SqlTransaction | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command using "FOR XML AUTO" |
return |
public static ExecuteXmlReader ( |
||
transaction | A valid SqlTransaction | |
spName | string | The name of the stored procedure |
return |
public static ExecuteXmlReaderTypedParams ( |
||
connection | A valid SqlConnection object | |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return |
public static ExecuteXmlReaderTypedParams ( |
||
transaction | A valid SqlTransaction object | |
spName | String | The name of the stored procedure |
dataRow | The dataRow used to hold the stored procedure's parameter values. | |
return |
public static FillDataset ( |
||
connection | A valid SqlConnection | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
dataSet | A dataset wich will contain the resultset generated by the command | |
tableNames | string | This array will be used to create table mappings allowing the DataTables to be referenced /// by a user defined name (probably the actual table name) /// |
return | void |
public static FillDataset ( |
||
connection | A valid SqlConnection | |
spName | string | The name of the stored procedure |
dataSet | A dataset wich will contain the resultset generated by the command | |
tableNames | string | This array will be used to create table mappings allowing the DataTables to be referenced /// by a user defined name (probably the actual table name) /// |
return | void |
public static FillDataset ( |
||
transaction | A valid SqlTransaction | |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
dataSet | A dataset wich will contain the resultset generated by the command | |
tableNames | string | This array will be used to create table mappings allowing the DataTables to be referenced /// by a user defined name (probably the actual table name) /// |
return | void |
public static FillDataset ( |
||
transaction | A valid SqlTransaction | |
spName | string | The name of the stored procedure |
dataSet | A dataset wich will contain the resultset generated by the command | |
tableNames | string | This array will be used to create table mappings allowing the DataTables to be referenced /// by a user defined name (probably the actual table name) /// |
return | void |
public static FillDataset ( string connectionString, CommandType commandType, string commandText, |
||
connectionString | string | A valid connection string for a SqlConnection |
commandType | CommandType | The CommandType (stored procedure, text, etc.) |
commandText | string | The stored procedure name or T-SQL command |
dataSet | A dataset wich will contain the resultset generated by the command | |
tableNames | string | This array will be used to create table mappings allowing the DataTables to be referenced /// by a user defined name (probably the actual table name) |
return | void |
public static FillDataset ( string connectionString, string spName, |
||
connectionString | string | A valid connection string for a SqlConnection |
spName | string | The name of the stored procedure |
dataSet | A dataset wich will contain the resultset generated by the command | |
tableNames | string | This array will be used to create table mappings allowing the DataTables to be referenced /// by a user defined name (probably the actual table name) /// |
return | void |
public static TableValuedToDB ( string _sqlConnStr, |
||
_sqlConnStr | string | |
dt | ||
return | void |
public static UpdateDataset ( |
||
insertCommand | A valid transact-SQL statement or stored procedure to insert new records into the data source | |
deleteCommand | A valid transact-SQL statement or stored procedure to delete records from the data source | |
updateCommand | A valid transact-SQL statement or stored procedure used to update records in the data source | |
dataSet | The DataSet used to update the data source | |
tableName | string | The DataTable used to update the data source. |
return | void |