Click or drag to resize

Utils_Sql Class

SQL Utilities.
Inheritance Hierarchy
SystemObject
  MicaSystems.UtilsUtils_Sql

Namespace:  MicaSystems.Utils
Assembly:  MicaSystems.Utils (in MicaSystems.Utils.dll) Version: 1.0.0.0 (1.1.0.123)
Syntax
C#
public static class Utils_Sql

The Utils_Sql type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberOperationsPerformance
Gets or sets an optionnal (and Local) checker used to record performanes during Sql operations.
Top
Methods
  NameDescription
Public methodStatic memberColumnExists
Checks if a column exists in a table of a database.
Public methodStatic memberEnsureClosed
Ensures that a data reader is closed. Will not throw if the reader is null or already closed.
Public methodStatic memberEnsureColumn
Ensures a column definition inside a SQL table.
Public methodStatic memberEnsureIndex
Ensures a column index on a SQL table.

Note: for Packflow, the schema should be DBADMIN.

Public methodStatic memberEnsureIndexGroups
Ensures all indexes on a SQL table. Based on column definitions.
Public methodStatic memberEnsureTable
Ensures a table definition in a database.
Public methodStatic memberGetClrType
Tries to obtain the .Net type corresponding to a SQL column type.
Public methodStatic memberGetReferencedObjects
Generates an xml of all objects referenced by the connection.

IMPORTANT : USE ONLY FOR DEBUGGING PURPOSE !!!

http://blogs.msdn.com/b/dataaccesstechnologies/archive/2009/04/08/how-to-find-out-the-data-reader-referencing-an-ado-net-connection-object-to-fix-the-error-there-is-already-an-open-datareader-associated-with-this-command-which-must-be-closed-first.aspx

Public methodStatic memberGetTableColumns
Gets the column names of a SQL table.
Public methodStatic memberIsClosed
Checks if a SQL connection is closed (not open, closed, opening, or broken).
Public methodStatic memberIsOpen
Checks if a SQL connection is open (not closed or broken).
Public methodStatic memberMica_GetKey
Gets the key using Mica_GetPropertyValue.
Public methodStatic memberMica_GetPropertyValue
Gets the string value of a property using reflection.
Public methodStatic memberMica_GetTitle
Gets the title using Mica_GetPropertyValue.
Public methodStatic memberTableExists(SqlConnection, String)
Checks if a table exists in a database.
Public methodStatic memberTableExists(SqlConnection, String, String)
Checks if a table exists in a database, in a given schema.
Public methodStatic memberTableExists(SqlConnection, String, String, String)
Checks if a table exists in a database, in a given schema.
Public methodStatic memberTableExistsInDatabase
Checks if a table exists in a database.
Top
See Also