The SQL statement processing for adding, deleting, modifying, and querying conventional data processing is encapsulated.
L datadeal encapsulates DAO Database Operation Processing and simplifies interactive processing between page controls and databases, so that addition and editing of SQL statements without spelling should be combined with mysqlparameters
(1) database transaction execution
Ü one or more separated statements are submitted for execution.
Sqlexecute parameter SQL or mysqlparameters
Ü submit and execute multiple statements together
Sqlexecute parameter list <string> sqls SQL statement set, empty statement ignored
Ü separate execution
Try
{
Transaction start transactionbegin ()
Statement execution
Transaction commit transactioncommit ()
}
Catch (exception ex)
{
Transaction rollback transactionrollback ()
Logger. Error ("error", ex );
}
(2) database query results
Ü get the DataSet object
The getdataset parameter is used for multiple string SQL statements. Separate simple SQL statements.
The mysqlparametersparameters custom SQL and parameter list are applicable to statements with parameters.
Getdatasetprocedure parameter string procname stored procedure name, mysqlparameters custom SQL parameter list null indicates no Parameter
Ü get the datatable object
Getdatatable and getdataset
Gettable is used to simplify spelling SQL
Ü obtain the datareader object
Getdatareader and getdataset
Note: The obtained datareader must be closed in time after use.
Ü obtain the first column of the First row
Getscalar and getdataset
(3) Common Control binding
Ü bind a list control
Bindlistctrl
Bindcodelist
Binddepartlist
L querybutton implements the iquerybutton interface and the background processing class of the deal button in XML.
L querycolumn implements the iquerycolumn interface in combination with the background processing class for calccs columns in XML
L query default implements the IQUERY default Interface in combination with the background processing class for obtaining the default value in XML.
L queryfooter implements the iqueryfooter interface in combination with the background processing class for sum calculation in XML
L queryfunction implements the iqueryfunction interface in combination with the ifunctioncalc background processing class in XML (not recommended)
L queryrow implements the iqueryrow interface and adds the row background processing class in XML.
L query validate implements the iqueryvalidate interface in combination with the servervalidate type button in XML background verification class
L querywhere implements the iquerywhere interface and the background processing class for the default sys type conditions in XML.
For more information, see the detailed explanation.
Welcome to: http: // 121.18.78.216, which is a demonstration platform for ease of query and analysis, workflow, content management, and project management.