The DataServer type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| DataServer(String) |
Instantiate a new DataServer using the supplied connection string
| |
| DataServer(IiMISUser) |
Instantiate a new DataServer using the connection string associated with the IiMISUser object
sent in as a parameter.
|
Methods
| Name | Description | |
|---|---|---|
| BeginTransaction |
Starts a database transaction. Any other database operations performed using this instance of the DataServer
will be in the same transaction until a CommitTransaction()()()() or RollbackTransaction()()()() is called.
| |
| BindAndExecute |
Binds the supplied parameters to the supplied command and executes the command. The command must have been
prepared with a call to PrepareCommand(SqlCommand, CommandType, String, array<SqlParameter>[]()[][]). This method can then be called in a loop with different
parameters to save the prepare time when the same statement is executed over and over.
| |
| CloseConnection |
Closes the connection to the database if it is open. If there is no open Connection no harm is done by
calling this method. If there is an open connection and there is also an open transaction the transaction
will be rolled back before the connection is closed.
| |
| CommitTransaction |
If there is an open transaction associated with this DataServer instance, it will be committed. If
there is no open transaction no harm is done by calling this method.
| |
| CreateObjRef |
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.) | |
| Dispose |
Rolls back and open transaction and closes any open connection
| |
| Equals | (Inherited from Object.) | |
| ExecuteNonQuery(CommandType, String) |
Executes the SQL query in the sql parameter against the database. Use this method when the sql query
does not return a result set (e.g., INSERT, UPDATE, or some stored procs). Otherwise, use
ExecuteQuery(CommandType, String) if a result set is desired.
| |
| ExecuteNonQuery(CommandType, String, array<SqlParameter>[]()[][]) |
Executes the SQL query in the sql parameter against the database. Use this method when the sql query
does not return a result set (e.g., INSERT, UPDATE, or some stored procs). Otherwise, use
ExecuteQuery(CommandType, String, array<SqlParameter>[]()[][]) if a result set is desired.
| |
| ExecuteQuery(CommandType, String) |
Executes the SQL query in the sql parameter against the database. Use this method when the sql query
returns a result set (e.g., SELECT or some stored procs). Otherwise, use ExecuteNonQuery(CommandType, String).
| |
| ExecuteQuery(CommandType, String, array<SqlParameter>[]()[][]) |
Executes the SQL query in the sql parameter against the database. Use this method when the sql query
returns a result set (e.g., SELECT or some stored procs). Otherwise, use ExecuteNonQuery(CommandType, String, array<SqlParameter>[]()[][]).
| |
| ExecuteReader(CommandType, String) |
Executes the SQL query in the sql parameter against the database. Use this method when the sql query
returns a result set (e.g., SELECT or some stored procs). Otherwise, use ExecuteNonQuery(CommandType, String).
| |
| ExecuteReader(CommandType, String, array<SqlParameter>[]()[][]) |
Executes the SQL query in the sql parameter against the database. Use this method when the sql query
returns a result set (e.g., SELECT or some stored procs). Otherwise, use ExecuteNonQuery(CommandType, String, array<SqlParameter>[]()[][]).
| |
| ExecuteScalar |
Executes the query, and returns the first column of the first row in the resultset returned by the query. Extra columns or rows are ignored.
| |
| Finalize |
Destructor
(Overrides Object..::..Finalize()()()().) | |
| GetHashCode |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetLifetimeService |
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.) | |
| GetType |
Gets the Type of the current instance.
(Inherited from Object.) | |
| InitializeLifetimeService |
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.) | |
| MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| MemberwiseClone(Boolean) |
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.) | |
| PrepareCommand |
Prepares a SQL command to be executed. This should not normally be called outside of this class
but is public in case the same statement needs to be executed over and over with different bind variables.
| |
| RollbackTransaction |
If there is an open transaction associated with this DataServer instance, all statements executed
within that transaction will be rolled back (discarded). If there is no open transaction no harm
is done by calling this method.
| |
| ToString | (Inherited from Object.) |
Properties
| Name | Description | |
|---|---|---|
| Connection |
Gets the current SqlConnection to the database.
| |
| IsTransactionOpen |
Gets an indication of whether or not the DataServer instance has an open transaction
|