C# 클래스 EmTrac2SF.DBAccess

Class with static methods to handle all database interaction
상속: IDisposable
파일 보기 프로젝트 열기: fmendes/SalesForceCSharpAPI

공개 프로퍼티들

프로퍼티 타입 설명
Cache System.Web.Caching.Cache
ErrorLabel System.Web.UI.WebControls.Label
ErrorMessage string
MainDB string
iConnectionRetries int
objConn System.Data.SqlClient.SqlConnection
objIsolationLevel IsolationLevel
objLastUpdateRow System.Data.DataRow
objSync object
strLogFlag string
strPath string

공개 메소드들

메소드 설명
Dispose ( ) : void
GetConnection ( ) : SqlConnection

Creates a SqlConnection using the Default Connection String

GetConnection ( string strName ) : SqlConnection

Creates a SqlConnection using the given Connection String

GetConnectionRef ( string strName ) : SqlConnection
GetConnectionString ( ) : string
GetConnectionString ( string strName ) : string
GetDataSetFromSQL ( string strSQL ) : DataSet
GetDataTableFromSQL ( string strSQL ) : DataTable
GetDataTableFromSQLFile ( string strFileName, string strPrependScript = null, string strCondition = null ) : DataTable
GetIntegerFromSQL ( string strSQL ) : int
GetSQLFromFile ( string strFile ) : string
GetSqlDataReaderFromSQL ( string strSQL ) : System.Data.SqlClient.SqlDataReader
GetStringFromSQL ( string strSQL ) : string
ReplaceApostrophes ( string strValue ) : string
ReportError ( string strErrorMsg ) : void
RunSQL ( string strSQL ) : int
SetConnectionRef ( string strName, SqlConnection sc ) : void
StringFormat ( string strFormat ) : string

Does the same thing as 'string.Format' but duplicating single quotes so it will be accepted in the SQL statement context. Example: O'Hare will become O''Hare

TryConnect ( ) : bool

Opens the connection to the database

TryConnect ( string strName ) : bool

Opens the connection to the database using the given Connection String

UpdateAdapter ( DataSet ds, SqlDataAdapter objSqlAdapter, SqlCommand objComm ) : void
UpdateAdapterRowCheck ( DataSet ds, SqlDataAdapter objSqlAdapter, SqlCommand objComm ) : void
objSqlAdapter_RowUpdated ( object sender, System.Data.SqlClient.SqlRowUpdatedEventArgs e ) : void
objSqlAdapter_RowUpdating ( object sender, System.Data.SqlClient.SqlRowUpdatingEventArgs e ) : void

보호된 메소드들

메소드 설명
Dispose ( bool bNative = true ) : void

비공개 메소드들

메소드 설명
CommitAndDisconnect ( SqlTransaction &objTrans ) : void
RollbackAndReportError ( SqlTransaction &objTrans, Exception excpt ) : void

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool bNative = true ) : void
bNative bool
리턴 void

GetConnection() 공개 메소드

Creates a SqlConnection using the Default Connection String
public GetConnection ( ) : SqlConnection
리턴 System.Data.SqlClient.SqlConnection

GetConnection() 공개 메소드

Creates a SqlConnection using the given Connection String
public GetConnection ( string strName ) : SqlConnection
strName string A connection string
리턴 System.Data.SqlClient.SqlConnection

GetConnectionRef() 공개 메소드

public GetConnectionRef ( string strName ) : SqlConnection
strName string
리턴 System.Data.SqlClient.SqlConnection

GetConnectionString() 공개 메소드

public GetConnectionString ( ) : string
리턴 string

GetConnectionString() 공개 정적인 메소드

public static GetConnectionString ( string strName ) : string
strName string
리턴 string

GetDataSetFromSQL() 공개 메소드

public GetDataSetFromSQL ( string strSQL ) : DataSet
strSQL string
리턴 System.Data.DataSet

GetDataTableFromSQL() 공개 메소드

public GetDataTableFromSQL ( string strSQL ) : DataTable
strSQL string
리턴 System.Data.DataTable

GetDataTableFromSQLFile() 공개 메소드

public GetDataTableFromSQLFile ( string strFileName, string strPrependScript = null, string strCondition = null ) : DataTable
strFileName string
strPrependScript string
strCondition string
리턴 System.Data.DataTable

GetIntegerFromSQL() 공개 메소드

public GetIntegerFromSQL ( string strSQL ) : int
strSQL string
리턴 int

GetSQLFromFile() 공개 메소드

public GetSQLFromFile ( string strFile ) : string
strFile string
리턴 string

GetSqlDataReaderFromSQL() 공개 메소드

public GetSqlDataReaderFromSQL ( string strSQL ) : System.Data.SqlClient.SqlDataReader
strSQL string
리턴 System.Data.SqlClient.SqlDataReader

GetStringFromSQL() 공개 메소드

public GetStringFromSQL ( string strSQL ) : string
strSQL string
리턴 string

ReplaceApostrophes() 공개 정적인 메소드

public static ReplaceApostrophes ( string strValue ) : string
strValue string
리턴 string

ReportError() 공개 메소드

public ReportError ( string strErrorMsg ) : void
strErrorMsg string
리턴 void

RunSQL() 공개 메소드

public RunSQL ( string strSQL ) : int
strSQL string
리턴 int

SetConnectionRef() 공개 메소드

public SetConnectionRef ( string strName, SqlConnection sc ) : void
strName string
sc System.Data.SqlClient.SqlConnection
리턴 void

StringFormat() 공개 정적인 메소드

Does the same thing as 'string.Format' but duplicating single quotes so it will be accepted in the SQL statement context. Example: O'Hare will become O''Hare
public static StringFormat ( string strFormat ) : string
strFormat string String containing zero or more format items.
리턴 string

TryConnect() 공개 메소드

Opens the connection to the database
public TryConnect ( ) : bool
리턴 bool

TryConnect() 공개 메소드

Opens the connection to the database using the given Connection String
public TryConnect ( string strName ) : bool
strName string A Connection String
리턴 bool

UpdateAdapter() 공개 메소드

public UpdateAdapter ( DataSet ds, SqlDataAdapter objSqlAdapter, SqlCommand objComm ) : void
ds System.Data.DataSet
objSqlAdapter System.Data.SqlClient.SqlDataAdapter
objComm System.Data.SqlClient.SqlCommand
리턴 void

UpdateAdapterRowCheck() 공개 메소드

public UpdateAdapterRowCheck ( DataSet ds, SqlDataAdapter objSqlAdapter, SqlCommand objComm ) : void
ds System.Data.DataSet
objSqlAdapter System.Data.SqlClient.SqlDataAdapter
objComm System.Data.SqlClient.SqlCommand
리턴 void

objSqlAdapter_RowUpdated() 공개 메소드

public objSqlAdapter_RowUpdated ( object sender, System.Data.SqlClient.SqlRowUpdatedEventArgs e ) : void
sender object
e System.Data.SqlClient.SqlRowUpdatedEventArgs
리턴 void

objSqlAdapter_RowUpdating() 공개 메소드

public objSqlAdapter_RowUpdating ( object sender, System.Data.SqlClient.SqlRowUpdatingEventArgs e ) : void
sender object
e System.Data.SqlClient.SqlRowUpdatingEventArgs
리턴 void

프로퍼티 상세

Cache 공개적으로 프로퍼티

public Cache,System.Web.Caching Cache
리턴 System.Web.Caching.Cache

ErrorLabel 공개적으로 프로퍼티

public Label,System.Web.UI.WebControls ErrorLabel
리턴 System.Web.UI.WebControls.Label

ErrorMessage 공개적으로 프로퍼티

public string ErrorMessage
리턴 string

MainDB 공개적으로 프로퍼티

public string MainDB
리턴 string

iConnectionRetries 공개적으로 정적으로 프로퍼티

public static int iConnectionRetries
리턴 int

objConn 공개적으로 프로퍼티

public SqlConnection,System.Data.SqlClient objConn
리턴 System.Data.SqlClient.SqlConnection

objIsolationLevel 공개적으로 프로퍼티

public IsolationLevel objIsolationLevel
리턴 IsolationLevel

objLastUpdateRow 공개적으로 프로퍼티

public DataRow,System.Data objLastUpdateRow
리턴 System.Data.DataRow

objSync 공개적으로 정적으로 프로퍼티

public static object objSync
리턴 object

strLogFlag 공개적으로 프로퍼티

public string strLogFlag
리턴 string

strPath 공개적으로 프로퍼티

public string strPath
리턴 string