C# Класс PROJECTNAMESPACE.SqlServers

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetEmbeddedResource ( string resourceFileName ) : string
GetEmbeddedScripts ( string resourceFileName, InstallSetup setup ) : List
HasLength ( System dataType ) : bool
ReadSQLFileSectionsFromResource ( string resourceFileName, InstallSetup setup ) : string[]
RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, string>.List failedScripts, List successOrderScripts, List _databaseItems, InstallSetup setup ) : void
RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, string>.List failedScripts, List _databaseItems, InstallSetup setup ) : void
RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, List _databaseItems, InstallSetup setup ) : void

Приватные методы

Метод Описание
BuildConnectionString ( bool integratedSecurity, string databaseName, string serverName, string userName, string password ) : string
CallMethod ( string text, SqlConnection connection, SqlTransaction transaction, InstallSetup setup ) : void
CanUseExtendedProperty ( string connectionString ) : bool

Determines if we can use extended properties, Azure does NOT allow them

CreateDatabase ( InstallSetup setup ) : void
DeleteExtendedProperty ( string connectionString, string propertyName ) : void
ExecuteCommand ( SqlCommand command ) : void
ExecuteSQL ( SqlConnection connection, SqlTransaction transaction, string sql, InstallSetup setup ) : void
ExecuteSQL ( SqlConnection connection, SqlTransaction transaction, string sql, InstallSetup setup, string>.List failedScripts ) : void
ExecuteSQL ( SqlConnection connection, SqlTransaction transaction, string sql, InstallSetup setup, string>.List failedScripts, List successOrderScripts ) : void
ExtendedPropertyExists ( string connectionString, string property, string user, string table, string column ) : bool
GetDatabaseMetaProperty ( string connectionString, string propertyName ) : string
GetDatabaseNames ( string connectString ) : string[]
GetHistory ( string connectionString ) : List
GetSQLDropScript ( string sql ) : string

Try to strip a name of a database object from a create script

GetServers ( ) : string[]
GetSkipSectionName ( string text ) : string
GetSqlColumnsForTable ( string tableName ) : string
GetSqlForForeignKeys ( string parentTable, string childTable, string constraintName ) : string
GetSqlForRelationships ( string tableName ) : string
GetSqlForTableExtendedPropertyLikeCount ( string tableName, string likeString ) : string
GetTableColumns ( string connectString, string tableName ) : DataSet
GetTableNamesAsArrayList ( string connectString ) : ArrayList
HasCreatePermissions ( string connectString ) : bool
InsertExtendedPropery ( string connectionString, string property, string propertyValue, string user, string table, string column ) : void
SQLAllocHandle ( short hType, IntPtr inputHandle, IntPtr &outputHandle ) : short
SQLBrowseConnect ( IntPtr hconn, StringBuilder inString, short inStringLength, StringBuilder outString, short outStringLength, short &outLengthNeeded ) : short
SQLFreeHandle ( short hType, IntPtr handle ) : short
SQLSetEnvAttr ( IntPtr henv, int attribute, IntPtr valuePtr, int strLength ) : short
SQLStripObjectName ( string sql, string objectHeader ) : string
SelectExtendedProperty ( string connectionString, string property, string user, string table, string column ) : string
SkipScriptPrompt ( InvalidSQLException ex ) : bool
SqlRemoveTable ( string tableName ) : string
SqlServers ( ) : System
TestConnectionString ( string connectString ) : bool
UpdateDatabaseMetaProperty ( string connectionString, string propertyName, string propertyValue ) : void
UpdateExtendedProperty ( string connectionString, string property, string propertyValue, string user, string table, string column ) : void

Описание методов

GetEmbeddedResource() публичный статический Метод

public static GetEmbeddedResource ( string resourceFileName ) : string
resourceFileName string
Результат string

GetEmbeddedScripts() публичный статический Метод

public static GetEmbeddedScripts ( string resourceFileName, InstallSetup setup ) : List
resourceFileName string
setup InstallSetup
Результат List

HasLength() публичный статический Метод

public static HasLength ( System dataType ) : bool
dataType System
Результат bool

ReadSQLFileSectionsFromResource() публичный статический Метод

public static ReadSQLFileSectionsFromResource ( string resourceFileName, InstallSetup setup ) : string[]
resourceFileName string
setup InstallSetup
Результат string[]

RunEmbeddedFile() публичный статический Метод

public static RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, string>.List failedScripts, List successOrderScripts, List _databaseItems, InstallSetup setup ) : void
connection System.Data.SqlClient.SqlConnection
transaction System.Data.SqlClient.SqlTransaction
resourceFileName string
failedScripts string>.List
successOrderScripts List
_databaseItems List
setup InstallSetup
Результат void

RunEmbeddedFile() публичный статический Метод

public static RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, string>.List failedScripts, List _databaseItems, InstallSetup setup ) : void
connection System.Data.SqlClient.SqlConnection
transaction System.Data.SqlClient.SqlTransaction
resourceFileName string
failedScripts string>.List
_databaseItems List
setup InstallSetup
Результат void

RunEmbeddedFile() публичный статический Метод

public static RunEmbeddedFile ( SqlConnection connection, SqlTransaction transaction, string resourceFileName, List _databaseItems, InstallSetup setup ) : void
connection System.Data.SqlClient.SqlConnection
transaction System.Data.SqlClient.SqlTransaction
resourceFileName string
_databaseItems List
setup InstallSetup
Результат void