资源简介
☆ 资料说明:☆
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
相关资源
- MySql.Data.dll 6.4.4 for .net 4.0
- 数据库编程技术总结ODBC API、ADO、AD
- [itpub.net]Linux + Oracle 11g R2 RAC 安装配置
- 最新mysql.data.dll(6.7.4.0) for .net4.5
- MySql.Data.dll
- SQLServer高效批量插入数据(SqlBulkCop
- mysql.data.dll(.net 4.0或以前版本
- SQL语句模拟器
- System.Data.SQLite for .NET3.5
- oracle全托管驱动Oracle.ManagedDataAccess
- mysql-connector-net-6.8.8
- NoSql MonGoDB视频教程全套
- 库存管理系统web版全部源码。
- MVC+ICO-AutoFac搭建的项目框架DEMO 紧供学
- .net core使用autofac
- 多数据库连接(支持MySqlSqlserverOracl
- oracle ODP.NET 批量插入或更新
- MySQL 参考手册简体中文CHM版.rar解压密
- 企业网站系统商业版,,Access数据库
- mysql.data.dll 几乎所有版本
- .net SQLite源代码(sqlite-netFx-source-1.0
- Excel数据导入SQL Server 辅助工具
-
基于.net fr
amework 4.5 的postgresql 的连 - 史上最好传智播客就业班.net培训教程
- SQLite.Interop.dl(32位和64位)给个日期
- 图书馆管理系统27318
- 基于sql的《宾馆客房管理系统》
- 图书馆管理信息系统.rar
- .net Core IdentityServer4 Server
- 在线考试系统完整版sql server2000+.net
评论
共有 条评论