C# 클래스 CinderellaLauncher.DatabaseIO

파일 보기 프로젝트 열기: ThomasMoreCollege/CinderellaMGS 1 사용 예제들

공개 메소드들

메소드 설명
CheckForRows ( string sqlStatement ) : bool

This method allowed you to determine if an sql statement will return any rows.

CloseConnection ( ) : void

Closes the connection if it is open.

DatabaseIO ( ) : System
ExecuteQuery ( string sqlStatement ) : int

Method will execute a non query SQL statement and return the number of rows affected.

GetConnection ( ) : SqlConnection

Creates the SQLConnection object "conn" which is used throughout the rest of the databaseIO methods.

GetRows ( string sqlStatement ) : int

This method will allow you to determine how many rows will be returned from an sql query.

ReturnFirstCellInt ( string sqlStatement ) : int
ReturnFirstCellString ( string sqlStatement ) : string
checkConnection ( ) : bool

This method will check for a valid connection string and try opening a new connection.

getAggDataString ( string sqlComm, string tableName ) : string

Method used when executing an sql query that is retrieving aggregate data.

getDataSet ( string sqlComm, string tableName ) : DataSet

This method will allow you to retrieve a dataset containing the data from the executed query.

비공개 메소드들

메소드 설명
errorCheck ( Exception errorMessage ) : void

Method is used to help centralize and customize database error messages.

메소드 상세

CheckForRows() 공개 메소드

This method allowed you to determine if an sql statement will return any rows.
public CheckForRows ( string sqlStatement ) : bool
sqlStatement string SQL Query to use
리턴 bool

CloseConnection() 공개 메소드

Closes the connection if it is open.
public CloseConnection ( ) : void
리턴 void

DatabaseIO() 공개 메소드

public DatabaseIO ( ) : System
리턴 System

ExecuteQuery() 공개 메소드

Method will execute a non query SQL statement and return the number of rows affected.
public ExecuteQuery ( string sqlStatement ) : int
sqlStatement string SQL Query to be executed.
리턴 int

GetConnection() 공개 메소드

Creates the SQLConnection object "conn" which is used throughout the rest of the databaseIO methods.
public GetConnection ( ) : SqlConnection
리턴 System.Data.SqlClient.SqlConnection

GetRows() 공개 메소드

This method will allow you to determine how many rows will be returned from an sql query.
public GetRows ( string sqlStatement ) : int
sqlStatement string SQL Query to use
리턴 int

ReturnFirstCellInt() 공개 메소드

public ReturnFirstCellInt ( string sqlStatement ) : int
sqlStatement string
리턴 int

ReturnFirstCellString() 공개 메소드

public ReturnFirstCellString ( string sqlStatement ) : string
sqlStatement string
리턴 string

checkConnection() 공개 메소드

This method will check for a valid connection string and try opening a new connection.
public checkConnection ( ) : bool
리턴 bool

getAggDataString() 공개 메소드

Method used when executing an sql query that is retrieving aggregate data.
public getAggDataString ( string sqlComm, string tableName ) : string
sqlComm string SQL Aggregate Query
tableName string The specific table within the dataset.
리턴 string

getDataSet() 공개 메소드

This method will allow you to retrieve a dataset containing the data from the executed query.
public getDataSet ( string sqlComm, string tableName ) : DataSet
sqlComm string The SQL query you are using to retrieve the dataset
tableName string The specific table within the dataset.
리턴 System.Data.DataSet