C# 클래스 Argentini.Halide.H3Sql

The H3Sql class contains methods and properties for performing operations on, or evaluating, SQL databases.
파일 보기 프로젝트 열기: argentini/Halide

공개 메소드들

메소드 설명
ConnectionString ( string connectionStringName ) : String

The SQL connection string, retrieved from the web.config file by its name.

Exec ( String statement, String connectionStringName ) : System.Boolean

Execute a SQL stored procedure. Returns true or false indicating error state. Defaults to 30 second timeout period.

Exec ( String statement, String connectionStringName, Int32 timeout ) : System.Boolean

Execute a SQL stored procedure. Returns true or false indicating error state.

Exec ( string statement ) : System.Boolean

Execute a SQL stored procedure. Returns true or false indicating error state. Uses the default connection string "Halide".

ExportCSV ( String select, String connectionStringName, System.Boolean includeHeaders, System.Boolean alwaysUseQuotes, String filePath ) : System.Boolean

Generate CSV data from a SQL Server data request, and write it to a file. Converts quotation marks to """.

ExportCSV ( String select, String connectionStringName, String filePath ) : System.Boolean

Generate CSV data from a SQL Server data request, and write it to a file. Converts quotation marks to """. Includes a header row and quotation marks around all values.

GenerateCSV ( String select, String connectionStringName ) : StringBuilder

Generate CSV data from a SQL Server request. Converts quotation marks to """.

GenerateCSV ( String select, String connectionStringName, System.Boolean includeHeaders, System.Boolean alwaysUseQuotes ) : StringBuilder

Generate CSV data from a SQL Server request. Converts quotation marks to """.

GetSprocParams ( String procedureName, String connectionStringName ) : ].String[

Get names and SQL data types for stored procedure input parameters.

GetSprocParams ( string procedureName ) : ].String[

Get names and SQL data types for stored procedure input parameters. Uses the "Halide" connection string.

Lookup ( String sqlCommand ) : String

Look up a value from a database object. Returns only one string value, so query must only return one value. Uses the connection string named "Halide".

Lookup ( String sqlCommand, String connectionStringName ) : String

Look up a value from a database object. Returns only one string value, so query must only return one value. Defaults to a 30 second timeout.

Lookup ( String sqlCommand, String connectionStringName, Int32 timeout ) : String

Look up a value from a database object. Returns only one string value, so query must only return one value.

LookupBoolean ( String sqlCommand, System.Boolean &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".

LookupBoolean ( String sqlCommand, String connectionStringName, System.Boolean &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value.

LookupDateTime ( String sqlCommand, System.DateTime &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".

LookupDateTime ( String sqlCommand, String connectionStringName, System.DateTime &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value.

LookupDecimal ( String sqlCommand, Decimal &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".

LookupDecimal ( String sqlCommand, String connectionStringName, Decimal &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value.

LookupInt16 ( String sqlCommand, Int16 &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".

LookupInt16 ( String sqlCommand, String connectionStringName, Int16 &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value.

LookupInt32 ( String sqlCommand, Int32 &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".

LookupInt32 ( String sqlCommand, String connectionStringName, Int32 &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value.

LookupInt64 ( String sqlCommand, System.Int64 &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".

LookupInt64 ( String sqlCommand, String connectionStringName, System.Int64 &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value.

LookupString ( String sqlCommand, String &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".

LookupString ( String sqlCommand, String connectionStringName, String &output ) : void

Look up a value from a database object. Returns only one value, so query must only return one value.

PowerExec ( String procedureName, String paramNames, String paramValues, System.Boolean returnsValue, String connectionStringName ) : String

Execute a stored procedure with passed form field names in string array.

PowerExec ( String procedureName, String paramNames, String paramValues, System.Boolean returnsValue, String connectionStringName, Int32 timeOut ) : String

Execute a stored procedure with passed form field names in string array.

PowerExec ( String procedureName, String paramNames, String paramValues, String connectionStringName ) : String

Execute a stored procedure with passed form field names in string array.

This method assumes that the stored procedure returns a value. If it does not, the procedure will execute, but an exception will be thrown.

PowerExec ( string procedureName, string paramNames, string paramValues ) : String

Execute a stored procedure with passed form field names in string array. Uses the default connection string "Halide".

This method assumes that the stored procedure returns a value. If it does not, the procedure will execute, but an exception will be thrown.

ReadTable ( string statement ) : DataTable

Loads the results of a SQL query into a DataTable object. Uses the default connection string "Halide".

ReadTable ( string statement, string connectionStringName ) : DataTable

Loads the results of a SQL query into a DataTable object.

비공개 메소드들

메소드 설명
H3Sql ( ) : System

메소드 상세

ConnectionString() 공개 정적인 메소드

The SQL connection string, retrieved from the web.config file by its name.
public static ConnectionString ( string connectionStringName ) : String
connectionStringName string Name of a connection string within the Web.config file.
리턴 String

Exec() 공개 정적인 메소드

Execute a SQL stored procedure. Returns true or false indicating error state. Defaults to 30 second timeout period.
public static Exec ( String statement, String connectionStringName ) : System.Boolean
statement String SQL statement to execute.
connectionStringName String Name of a connection string in the Web.config file.
리턴 System.Boolean

Exec() 공개 정적인 메소드

Execute a SQL stored procedure. Returns true or false indicating error state.
public static Exec ( String statement, String connectionStringName, Int32 timeout ) : System.Boolean
statement String SQL statement to execute.
connectionStringName String Name of a connection string in the Web.config file.
timeout System.Int32 Timeout in seconds for the command to execute; use zero for no timeout period.
리턴 System.Boolean

Exec() 공개 정적인 메소드

Execute a SQL stored procedure. Returns true or false indicating error state. Uses the default connection string "Halide".
public static Exec ( string statement ) : System.Boolean
statement string SQL statement to execute.
리턴 System.Boolean

ExportCSV() 공개 정적인 메소드

Generate CSV data from a SQL Server data request, and write it to a file. Converts quotation marks to """.
public static ExportCSV ( String select, String connectionStringName, System.Boolean includeHeaders, System.Boolean alwaysUseQuotes, String filePath ) : System.Boolean
select String SQL Server command to execute, which retrieves a dataset.
connectionStringName String Connection String name in the Web.config file.
includeHeaders System.Boolean Include column names as a header row in the CSV file.
alwaysUseQuotes System.Boolean Wrap all values in quotation marks. False will omit quotation marks around numeric values.
filePath String Web-style path and filename for the output of the data.
리턴 System.Boolean

ExportCSV() 공개 정적인 메소드

Generate CSV data from a SQL Server data request, and write it to a file. Converts quotation marks to """. Includes a header row and quotation marks around all values.
public static ExportCSV ( String select, String connectionStringName, String filePath ) : System.Boolean
select String SQL Server command to execute, which retrieves a dataset.
connectionStringName String Connection String name in the Web.config file.
filePath String Web-style path and filename for the output of the data.
리턴 System.Boolean

GenerateCSV() 공개 정적인 메소드

Generate CSV data from a SQL Server request. Converts quotation marks to """.
public static GenerateCSV ( String select, String connectionStringName ) : StringBuilder
select String SQL Server command to execute, which retrieves a dataset.
connectionStringName String Connection String name in the Web.config file.
리턴 StringBuilder

GenerateCSV() 공개 정적인 메소드

Generate CSV data from a SQL Server request. Converts quotation marks to """.
public static GenerateCSV ( String select, String connectionStringName, System.Boolean includeHeaders, System.Boolean alwaysUseQuotes ) : StringBuilder
select String SQL Server command to execute, which retrieves a dataset.
connectionStringName String Connection String name in the Web.config file.
includeHeaders System.Boolean Include column names as a header row in the CSV file.
alwaysUseQuotes System.Boolean Wrap all values in quotation marks. False will omit quotation marks around numeric values.
리턴 StringBuilder

GetSprocParams() 공개 정적인 메소드

Get names and SQL data types for stored procedure input parameters.
public static GetSprocParams ( String procedureName, String connectionStringName ) : ].String[
procedureName String Name of the stored procedure.
connectionStringName String Name of a connection string in the Web.config file.
리턴 ].String[

GetSprocParams() 공개 정적인 메소드

Get names and SQL data types for stored procedure input parameters. Uses the "Halide" connection string.
public static GetSprocParams ( string procedureName ) : ].String[
procedureName string Name of the stored procedure.
리턴 ].String[

Lookup() 공개 정적인 메소드

Look up a value from a database object. Returns only one string value, so query must only return one value. Uses the connection string named "Halide".
public static Lookup ( String sqlCommand ) : String
sqlCommand String SQL query string for which to return a string value.
리턴 String

Lookup() 공개 정적인 메소드

Look up a value from a database object. Returns only one string value, so query must only return one value. Defaults to a 30 second timeout.
public static Lookup ( String sqlCommand, String connectionStringName ) : String
sqlCommand String SQL query string for which to return a string value.
connectionStringName String Name of a connection string in the Web.config file.
리턴 String

Lookup() 공개 정적인 메소드

Look up a value from a database object. Returns only one string value, so query must only return one value.
public static Lookup ( String sqlCommand, String connectionStringName, Int32 timeout ) : String
sqlCommand String SQL query string for which to return a string value.
connectionStringName String Name of a connection string in the Web.config file.
timeout System.Int32 Timeout in seconds for the request. Use zero for no timeout period.
리턴 String

LookupBoolean() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".
public static LookupBoolean ( String sqlCommand, System.Boolean &output ) : void
sqlCommand String SQL query string for which to return a value.
output System.Boolean Variable to receive the value
리턴 void

LookupBoolean() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value.
public static LookupBoolean ( String sqlCommand, String connectionStringName, System.Boolean &output ) : void
sqlCommand String SQL query string for which to return a value.
connectionStringName String Name of a connection string in the Web.config file.
output System.Boolean Variable which receives the result.
리턴 void

LookupDateTime() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".
public static LookupDateTime ( String sqlCommand, System.DateTime &output ) : void
sqlCommand String SQL query string for which to return a value.
output System.DateTime Variable to receive the value
리턴 void

LookupDateTime() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value.
public static LookupDateTime ( String sqlCommand, String connectionStringName, System.DateTime &output ) : void
sqlCommand String SQL query string for which to return a value.
connectionStringName String Name of a connection string in the Web.config file.
output System.DateTime Variable which receives the result.
리턴 void

LookupDecimal() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".
public static LookupDecimal ( String sqlCommand, Decimal &output ) : void
sqlCommand String SQL query string for which to return a value.
output Decimal Variable to receive the value
리턴 void

LookupDecimal() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value.
public static LookupDecimal ( String sqlCommand, String connectionStringName, Decimal &output ) : void
sqlCommand String SQL query string for which to return a value.
connectionStringName String Name of a connection string in the Web.config file.
output Decimal Variable which receives the result.
리턴 void

LookupInt16() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".
public static LookupInt16 ( String sqlCommand, Int16 &output ) : void
sqlCommand String SQL query string for which to return a value.
output System.Int16 Variable to receive the value
리턴 void

LookupInt16() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value.
public static LookupInt16 ( String sqlCommand, String connectionStringName, Int16 &output ) : void
sqlCommand String SQL query string for which to return a value.
connectionStringName String Name of a connection string in the Web.config file.
output System.Int16 Variable which receives the result.
리턴 void

LookupInt32() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".
public static LookupInt32 ( String sqlCommand, Int32 &output ) : void
sqlCommand String SQL query string for which to return a value.
output System.Int32 Variable to receive the value
리턴 void

LookupInt32() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value.
public static LookupInt32 ( String sqlCommand, String connectionStringName, Int32 &output ) : void
sqlCommand String SQL query string for which to return a value.
connectionStringName String Name of a connection string in the Web.config file.
output System.Int32 Variable which receives the result.
리턴 void

LookupInt64() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".
public static LookupInt64 ( String sqlCommand, System.Int64 &output ) : void
sqlCommand String SQL query string for which to return a value.
output System.Int64 Variable to receive the value
리턴 void

LookupInt64() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value.
public static LookupInt64 ( String sqlCommand, String connectionStringName, System.Int64 &output ) : void
sqlCommand String SQL query string for which to return a value.
connectionStringName String Name of a connection string in the Web.config file.
output System.Int64 Variable which receives the result.
리턴 void

LookupString() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value. Uses the connection string named "Halide".
public static LookupString ( String sqlCommand, String &output ) : void
sqlCommand String SQL query string for which to return a value.
output String Variable to receive the value
리턴 void

LookupString() 공개 정적인 메소드

Look up a value from a database object. Returns only one value, so query must only return one value.
public static LookupString ( String sqlCommand, String connectionStringName, String &output ) : void
sqlCommand String SQL query string for which to return a value.
connectionStringName String Name of a connection string in the Web.config file.
output String Variable which receives the result.
리턴 void

PowerExec() 공개 정적인 메소드

Execute a stored procedure with passed form field names in string array.
public static PowerExec ( String procedureName, String paramNames, String paramValues, System.Boolean returnsValue, String connectionStringName ) : String
procedureName String Name of stored procedure.
paramNames String string array with field names.
paramValues String string array with field values.
returnsValue System.Boolean If the stored procedure returns a value, set to true, /// otherwise, set to false. When false, the number of rows affected is returned as a string.
connectionStringName String Name of a connection string in the Web.config file.
리턴 String

PowerExec() 공개 정적인 메소드

Execute a stored procedure with passed form field names in string array.
public static PowerExec ( String procedureName, String paramNames, String paramValues, System.Boolean returnsValue, String connectionStringName, Int32 timeOut ) : String
procedureName String Name of stored procedure.
paramNames String string array with field names.
paramValues String string array with field values.
returnsValue System.Boolean If the stored procedure returns a value, set to true, /// otherwise, set to false. When false, the number of rows affected is returned as a string.
connectionStringName String Name of a connection string in the Web.config file.
timeOut System.Int32 SQL Command timeout value.
리턴 String

PowerExec() 공개 정적인 메소드

Execute a stored procedure with passed form field names in string array.

This method assumes that the stored procedure returns a value. If it does not, the procedure will execute, but an exception will be thrown.

public static PowerExec ( String procedureName, String paramNames, String paramValues, String connectionStringName ) : String
procedureName String Name of stored procedure.
paramNames String string array with field names.
paramValues String string array with field values.
connectionStringName String Name of a connection string in the Web.config file.
리턴 String

PowerExec() 공개 정적인 메소드

Execute a stored procedure with passed form field names in string array. Uses the default connection string "Halide".

This method assumes that the stored procedure returns a value. If it does not, the procedure will execute, but an exception will be thrown.

public static PowerExec ( string procedureName, string paramNames, string paramValues ) : String
procedureName string Name of stored procedure.
paramNames string string array with field names.
paramValues string string array with field values.
리턴 String

ReadTable() 공개 정적인 메소드

Loads the results of a SQL query into a DataTable object. Uses the default connection string "Halide".
public static ReadTable ( string statement ) : DataTable
statement string SQL statement to execute.
리턴 System.Data.DataTable

ReadTable() 공개 정적인 메소드

Loads the results of a SQL query into a DataTable object.
public static ReadTable ( string statement, string connectionStringName ) : DataTable
statement string SQL statement to execute.
connectionStringName string Name of a connection string in the Web.config file.
리턴 System.Data.DataTable