-
大小: 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# winform 串口收发数据 demo
- 利用C#语言实现MSChart控件中图形拖拽
- C# 设计模式 DEMO(供学习参考)
- C#自动升级程序
- WinForm窗体及其控件的自适应
- C#编写的温度采集上位机程序源码
- C#版银海社保系统连接
- c#实现Windows剪贴板监视器
- C#创建Excel文件并将数据导出到Excel文
- c#通过纯代码创建桌面快捷方式、创建
- 教务管理系统c#完整代码+数据库
- c#ftp客户端 支持主动和被动模式
- C#实现字符串RSA加密与解密 算法工程
- C#/SQLSERVER ATM取款机
- c# 精密星历内插计算
- 语音识别系统(asp.net+c#)
- C# TCP异步数据传输
- 评论抓取 asp.net编写 内含详细 数据抓
- C# 自动排课系统 算法 源码
- C#超市管理系统 完善
- C# 实现播放MP3的类
- 点,线缓冲区生成算法实现c#)
- C#高级编程(第10版)C# 6 .NET Core 1.0
- c#学生成绩管理系统
- winform简单计算器
- C#复选框重绘 Checkbox
- C# 两个窗体之间实时传递数据的
- C# 监控目录变化目录以及变化文件及
- C#Winform透明Textbox控件
- AE TXT生成点shp与点Shp生成TIN
评论
共有 条评论