C# 클래스 greenapple.Connectoperations

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

공개 메소드들

메소드 설명
delete ( string table, string where ) : int

deletes records from the database

describeTable ( string table ) : DataTable

gets the attributes of a table

insert ( string table, string attributes, string values ) : int

inserts a record into the database

mysqldate ( System.DateTime dat ) : string

this function converts .NET datetime to mysql date format

selectdatable ( string table, string attributes, string where ) : DataTable

retrives data from the database and puts it to a table

showDatabaseTables ( ) : DataTable

retrieves all the database tables for a given database

singleval ( string table, string attribute, string where ) : string

Retrieves only a cell from the database table

update ( string table, string attributes, string values, string where ) : int

updates the database

메소드 상세

delete() 공개 메소드

deletes records from the database
public delete ( string table, string where ) : int
table string table from whic data is to be deleted
where string the where clause used eg 'where id=1'
리턴 int

describeTable() 공개 메소드

gets the attributes of a table
public describeTable ( string table ) : DataTable
table string the table whose attribute is being got
리턴 System.Data.DataTable

insert() 공개 메소드

inserts a record into the database
public insert ( string table, string attributes, string values ) : int
table string table into which a record is to be inserted
attributes string attributes in the table that whose data is being inserted
values string values to the attributes of the table whose data is being inserted
리턴 int

mysqldate() 공개 메소드

this function converts .NET datetime to mysql date format
public mysqldate ( System.DateTime dat ) : string
dat System.DateTime the datetime object being converted to mysql date format
리턴 string

selectdatable() 공개 메소드

retrives data from the database and puts it to a table
public selectdatable ( string table, string attributes, string where ) : DataTable
table string table whose data is being retrieved
attributes string attributes of the table which is being retived
where string the where clause eg "where id>1 and name='guy'"
리턴 System.Data.DataTable

showDatabaseTables() 공개 메소드

retrieves all the database tables for a given database
public showDatabaseTables ( ) : DataTable
리턴 System.Data.DataTable

singleval() 공개 메소드

Retrieves only a cell from the database table
public singleval ( string table, string attribute, string where ) : string
table string table whose cell is being retrieved
attribute string attribute being retrieved
where string the where clause and this is mandatory
리턴 string

update() 공개 메소드

updates the database
public update ( string table, string attributes, string values, string where ) : int
table string the table being updated
attributes string the attributes to update
values string the values that correspond to the attributes
where string the clause to be used eg' where id=1'
리턴 int