91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

☆ 資料說明:☆ The Data Access Application Block is a .NET component that contains optimized data access code that will help you call stored procedures and issue SQL text commands against a SQL Server database; ☆ 文件清單:☆ Data Access Application Block for .NET V2.7z ☆ 相關網址:☆ Data Access Application Blo

資源截圖

代碼片段和文件信息

//?===============================================================================
//?Microsoft?Data?Access?Application?Block?for?.NET
//?http://msdn.microsoft.com/library/en-us/dnbda/html/daab-rm.asp
//
//?SQLHelper.cs
//
//?This?file?contains?the?implementations?of?the?SqlHelper?and?SqlHelperParameterCache
//?classes.
//
//?For?more?information?see?the?Data?Access?Application?Block?Implementation?Overview.?
//?===============================================================================
//?Release?history
//?VERSION DEscriptION
//???2.0 Added?support?for?FillDataset?UpdateDataset?and?“Param“?helper?methods
//
//?===============================================================================
//?Copyright?(C)?2000-2001?Microsoft?Corporation
//?All?rights?reserved.
//?THIS?CODE?AND?INFORMATION?IS?PROVIDED?“AS?IS“?WITHOUT?WARRANTY
//?OF?ANY?KIND?EITHER?EXPRESSED?OR?IMPLIED?INCLUDING?BUT?NOT
//?LIMITED?TO?THE?IMPLIED?WARRANTIES?OF?MERCHANTABILITY?AND/OR
//?FITNESS?FOR?A?PARTICULAR?PURPOSE.
//?==============================================================================

using?System;
using?System.Collections;
using?System.Data;
using?System.Data.SqlClient;
using?System.xml;

namespace?Microsoft.ApplicationBlocks.Data
{
????///?
????///?????The?SqlHelper?class?is?intended?to?encapsulate?high?performance?scalable?best?practices?for
????///?????common?uses?of?SqlClient
????///?

????public?sealed?class?SqlHelper
????{
????????#region?private?utility?methods?&?constructors

????????//?Since?this?class?provides?only?static?methods?make?the?default?constructor?private?to?prevent?
????????//?instances?from?being?created?with?“new?SqlHelper()“
????????private?SqlHelper()
????????{
????????}

????????///?
????????///?????This?method?is?used?to?attach?array?of?SqlParameters?to?a?SqlCommand.
????????///?????This?method?will?assign?a?value?of?DbNull?to?any?parameter?with?a?direction?of
????????///?????InputOutput?and?a?value?of?null.
????????///?????This?behavior?will?prevent?default?values?from?being?used?but
????????///?????this?will?be?the?less?common?case?than?an?intended?pure?output?parameter?(derived?as?InputOutput)
????????///?????where?the?user?provided?no?input?value.
????????///?

????????///?The?command?to?which?the?parameters?will?be?added
????????///?An?array?of?SqlParameters?to?be?added?to?command
????????private?static?void?AttachParameters(SqlCommand?command?SqlParameter[]?commandParameters)
????????{
????????????if?(command?==?null)?throw?new?ArgumentNullException(“command“);
????????????if?(commandParameters?!=?null)
????????????{
????????????????foreach?(SqlParameter?p?in?commandParameters)
????????????????{
????????????????????if?(p?!=?null)
????????????????????{
????????????????????????//?Check?for?derived?output?value?with?no?value?assigned
????????????????????

評論

共有 條評論