Description: SqlHelper source and use cases
SqlHelper is very convenient database operations functions, powerful, easy to use, remove a number of complex database operations of the code, in multi-tier application and have a lot of object-oriented application development
SqlHelper source with a detailed description of the sample in the original sample Sql statement 51aspx
Include the following:
Simple SQL statement (ExcuteSql)
Simple SQL statement with parameter (ExcuteSQLParm)
Simple stored procedure (ExcuteProc)
Stored procedure with parameters (ExcuteProcParm)
Returns only one field (ExcuteScalar)
Return data set (ExcuteReader)
Database with sample data and stored procedures updateTable \ updateTableByParm, we can modify test, reproduced Keep 51aspx of information, thank you!
1. Modify ExcuteSQLParm, adding examples of pass multiple parameters
2. On the implementation of the SQL error trapping added that when implementation of the error, the display SQL stateme
File list (Check if you may need any files):
App_Code\SqlHelper.cs
....Data\Sql_51aspx_DataDataSet.Designer.cs
........\Sql_51aspx_DataDataSet.xsc
........\Sql_51aspx_DataDataSet.xsd
........\Sql_51aspx_DataDataSet.xss
........\test51aspx.mdf
........\test51aspx_log.ldf
bin\Debug\SQLHelper.exe.config
...\.....\SQLHelper.vshost.exe
...\.....\SQLHelper.vshost.exe.config
obj\SQLHelper.csproj.FileListAbsolute.txt
Properties\Settings.Designer.cs
..........\Settings.settings
51aspx源码必读.txt
app.config
Default.aspx
Default.aspx.cs
ExcuteProc.aspx
ExcuteProc.aspx.cs
ExcuteProcParm.aspx
ExcuteProcParm.aspx.cs
ExcuteReader.aspx
ExcuteReader.aspx.cs
ExcuteScalar.aspx
ExcuteScalar.aspx.cs
ExcuteSQL.aspx
ExcuteSQL.aspx.cs
ExcuteSQLParm.aspx
ExcuteSQLParm.aspx.cs
Settings.cs
SQLHelper.csproj
SQLHelper.csproj.user
SQLHelper.sln
SQLHelper.suo
Web.Config
obj\Debug\TempPE
bin\Debug
obj\Debug
App_Code
App_Data
bin
obj
Properties