Today, nothing to do, the former own a database operation class re-organized a bit, the naming standard a bit, location and function re-planning a bit.
Source code Download: Http://files.cnblogs.com/xiaoshuai1992/xsFrameWork.SqlServer.zip
Please look at the pictures and introduction
Dboperate folder
Dbaccess class: The core class, the use of ADO to operate the database.
Dbinparameter: Parameters passed into the dbaccess, such as parameters, SQL statements, SP names, whether the SP is executing or returning data.
Dboutparameter: Outgoing parameters, such as datasets, execute results, run out parameters of the SP.
For ease of operation, add 2 additional files, run SQL directly and run SP separately, so it is clear.
Spoperate folder
Sphelper class: Mainly 3 methods executesp,getdataset,getdatatable
Xsspparameter class: Executes SP's parameter class, which contains string connection, parameter, SP name, whether to return data.
Why is it called xsspparameter instead of Spparameter? The main is the SqlParameter is the system comes with the class, in order to distinguish, so the 2 of the class is preceded by the XS
Sqloperate folder
SqlHelper class: Mainly Getdataset,getdatatable,exist,execute class, perform some common functions, query, Judge existence, execute SQL
Xssqlparameter class: SQL statement, database connection string, parameters.
Here Xssqlparameter and Xsspparameter both add and remove parameters, and the parameters are overwritten if they are added repeatedly. Because you always want to use it when defining parameters in your program, you don't have to define many of the same classes. To perform a n-update, just overwrite the parameter to OK.
However, there is still a problem, first I write the transaction does not have the corresponding processing procedures, only the original ecological use of dbaccess, and, this class has not been tested, but also needs to be constantly updated and perfected. If there is any improvement, please point out that we can study together.
Source code Download: Http://files.cnblogs.com/xiaoshuai1992/xsFrameWork.SqlServer.zip