Contains utility methods for working with database connections, commands, and related common tasks.
| C# |
public static class SqlUtility
| All Members | Methods | ||||
| Icon | Member | Description |
|---|---|---|
| CopyCommand(DbCommand) |
Creates a command of the same type that uses the same connection, including the parameters and values.
| |
| CopyConnection(DbConnection) |
Creates a connection of the same type with the same connection string.
| |
| CreateCommand(DBType, String) |
Creates a command of the correct type based on the given engine type.
| |
| CreateDataAdapter(DBType, String, String) |
Creates a data adapter of the correct type based on the given engine type.
| |
| CreateParameter(DBType, String, Object) |
Creates a command parameter of the correct type based on the given engine type.
| |
| CreateParameter(DBType, String, SqlDbType, Int32) |
Creates a command parameter of the correct type based on the given engine type.
| |
| OpenConnectionWithRetry(DBType, String, Boolean) |
Creates and opens a connection, retrying as necessary if an error or timeout occurs.
| |
| OpenConnectionWithRetry(DbConnection) |
Opens a connection if not already open, retrying as necessary if an error or timeout occurs.
| |
| OpenConnectionWithRetry(DbConnection, Boolean) |
Opens a connection if not already open, retrying as necessary if an error or timeout occurs.
| |
| PromptForRetry(SqlException, String, String) |
Prompts the user whether to retry a failed operation.
| |
| PromptForRetry(VistaDBSQLException, String, String) |
Prompts the user whether to retry a failed operation.
| |
| PromptForRetry(Exception, String, String) |
Prompts the user whether to retry a failed operation.
|
| Object | |
| SqlUtility | |