C# 클래스 DataAccessFramework.MSSqlDataTool

An abstract generalization of the CreateCommand that can connect to an MS SqlServer database.

This has to be extended in a specific class that can provide logic for creating the connection.

This implementation implements the CreateXYZParameter functions and the DataTool function.

상속: DataTool
파일 보기 프로젝트 열기: PeteProgrammer/DataAccessFramework

공개 메소드들

메소드 설명
CreateBinaryParameter ( string parameterName, byte value, int length ) : IDataParameter

Implements DataTool.CreateBinaryParameter(string,byte[],int?). Creates a database parameter for binary data.

CreateBoolParameter ( string parameterName, bool value ) : IDataParameter

Implements DataTool.CreateBoolParameter(string,bool). Creates a database parameter for a Boolean value.

CreateDateTimeParameter ( string parameterName, System.DateTime value ) : IDataParameter

Creates a database parameter for a datetime value

CreateDecimalParameter ( string parameterName, decimal value ) : IDataParameter

Creates database parameter for a decimal value.

CreateGuidParameter ( string parameterName, System.Guid value ) : IDataParameter

Creates database parameter for a GUID value.

CreateIntParameter ( string parameterName, int value ) : IDataParameter

Implements DataTool.CreateIntParameter(string,int?). Creates a database parameter for an integer value.

CreateLongParameter ( string parameterName, long value ) : IDataParameter
CreateMoneyParameter ( string parameterName, decimal value ) : IDataParameter

Creates a database parameter for a decimal value used for carrying monetary amount.

CreateStampParameter ( string parameterName, object value ) : IDataParameter

Creates a parameter for a timestamp field.

CreateStringParameter ( string parameterName, string value, int length ) : IDataParameter

Implements DataTool.CreateStringParameter. Creates a database parameter for a string value.

보호된 메소드들

메소드 설명
CreateCommand ( ) : IDbCommand

Implements DataTool.CreateCommand

메소드 상세

CreateBinaryParameter() 공개 메소드

Implements DataTool.CreateBinaryParameter(string,byte[],int?). Creates a database parameter for binary data.
public CreateBinaryParameter ( string parameterName, byte value, int length ) : IDataParameter
parameterName string /// The name of the parameter to create ///
value byte /// The value of the parameter. ///
length int /// The length of the parameter. If no value is passed /// a binary(MAX) parameter is created. ///
리턴 IDataParameter

CreateBoolParameter() 공개 메소드

Implements DataTool.CreateBoolParameter(string,bool). Creates a database parameter for a Boolean value.
public CreateBoolParameter ( string parameterName, bool value ) : IDataParameter
parameterName string /// The name of the parameter to create. ///
value bool /// The value for the parameter. ///
리턴 IDataParameter

CreateCommand() 보호된 메소드

Implements DataTool.CreateCommand
protected CreateCommand ( ) : IDbCommand
리턴 IDbCommand

CreateDateTimeParameter() 공개 메소드

Creates a database parameter for a datetime value
public CreateDateTimeParameter ( string parameterName, System.DateTime value ) : IDataParameter
parameterName string /// The name of the parameter. ///
value System.DateTime /// The value of the parameter ///
리턴 IDataParameter

CreateDecimalParameter() 공개 메소드

Creates database parameter for a decimal value.
public CreateDecimalParameter ( string parameterName, decimal value ) : IDataParameter
parameterName string /// The name of the parameter. ///
value decimal /// The value of the parameter ///
리턴 IDataParameter

CreateGuidParameter() 공개 메소드

Creates database parameter for a GUID value.
public CreateGuidParameter ( string parameterName, System.Guid value ) : IDataParameter
parameterName string /// The name of the parameter. ///
value System.Guid /// The value of the parameter ///
리턴 IDataParameter

CreateIntParameter() 공개 메소드

Implements DataTool.CreateIntParameter(string,int?). Creates a database parameter for an integer value.
public CreateIntParameter ( string parameterName, int value ) : IDataParameter
parameterName string /// The name of the parameter to create. ///
value int /// The value for the parameter. ///
리턴 IDataParameter

CreateLongParameter() 공개 메소드

public CreateLongParameter ( string parameterName, long value ) : IDataParameter
parameterName string
value long
리턴 IDataParameter

CreateMoneyParameter() 공개 메소드

Creates a database parameter for a decimal value used for carrying monetary amount.
public CreateMoneyParameter ( string parameterName, decimal value ) : IDataParameter
parameterName string /// The name of the parameter. ///
value decimal /// The value of the parameter ///
리턴 IDataParameter

CreateStampParameter() 공개 메소드

Creates a parameter for a timestamp field.
public CreateStampParameter ( string parameterName, object value ) : IDataParameter
parameterName string
value object
리턴 IDataParameter

CreateStringParameter() 공개 메소드

Implements DataTool.CreateStringParameter. Creates a database parameter for a string value.
public CreateStringParameter ( string parameterName, string value, int length ) : IDataParameter
parameterName string /// The name of the parameter to create. ///
value string /// The value of the parameter ///
length int /// The max length of the parameter. If no value is passed, /// a nvarchar(MAX) parameter is created. ///
리턴 IDataParameter