-
大小: 80KB文件类型: .cs金币: 1下载: 0 次发布日期: 2021-06-05
- 语言: C#
- 标签: 微软 C# OleDbHelper 源码
资源简介
微软C# OleDbHelper.cs 源码,微软C# OleDbHelper.cs 源码,微软C# OleDbHelper.cs 源码,微软C# OleDbHelper.cs 源码
代码片段和文件信息
//===============================================================================
// OleDbHelper based on Microsoft Data Access Application Block (DAAB) for .NET
// http://msdn.microsoft.com/library/en-us/dnbda/html/daab-rm.asp
//
// OleDbHelper.cs
//
// This file contains the implementations of the OleDbHelper and OleDbHelperParameterCache
// classes.
//
// The DAAB for MS Ole Db access for Oracle has been tested in the context of this Nile implementation
// but has not undergone the generic functional testing that the SQL version has gone through.
// You can use it in other .NET applications using Oracle databases. For complete docs explaining how to use
// and how it‘s built go to the originl appblock link.
// For this sample the code resides in the Nile namespaces not the Microsoft.ApplicationBlocks namespace
//==============================================================================
using System;
using System.Data;
using System.xml;
using System.Data.OleDb;
using System.Collections;
using System.Windows.Forms;
namespace Microsoft.ApplicationBlocks.Data
{
///
/// The OleDbHelper class is intended to encapsulate high performance scalable best practices for
/// common uses of OleDbClient.
///
public sealed class OleDbHelper
{
#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 OleDbHelper()“.
private OleDbHelper() {}
///
/// This method is used to attach array‘s of OleDbParameters to an OleDbCommand.
///
/// 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 OleDbParameters tho be added to command
private static void AttachParameters(OleDbCommand command OleDbParameter[] commandParameters)
{
foreach (OleDbParameter p in commandParameters)
{
//check for derived output value with no value assigned
if ((p.Direction == ParameterDirection.InputOutput) && (p.Value == null))
{
p.Value = DBNull.Value;
}
command.Parameters.Add(p);
}
}
///
/// This method assigns an array of values to an array of OleDbParameters.
///
/// array of OleDbParameters to be assigned values
/// array of objects holding the values to be assigned
private static void AssignParameterValues(OleDbParameter[] comma
相关资源
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
评论
共有 条评论