资源简介
西门子RFID读写程序,读取和写入信息,包含详细的日志。
代码片段和文件信息
using System;
using System.Data;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
using System.Globalization;
namespace cdcontrol
{
///
/// Oracledata 的摘要说明。
///
public class Oracledata
{
public OracleConnection dbConnection;
public OracleCommand cmd;
private OracleDataReader dataReader;
private OracleDataAdapter dataAdapter;
public Oracledata()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
//同一程序中多次使用,第二次使用时,需先把CMD注销
public void TempDispose()
{
if (cmd != null)
{
cmd.Dispose();
}
}
public void Open()
{
string cn = ““;
if (System.Configuration.ConfigurationManager.ConnectionStrings[“ConnectionString“] != null)
{
cn = System.Configuration.ConfigurationManager.ConnectionStrings[“ConnectionString“].ToString();
}
else
{
cn = “Password=VGSM;User ID=VGSM;Data Source=VGSM;“;
}
dbConnection = new Oracle.DataAccess.Client.OracleConnection(cn);
dbConnection.Open();
}
public void Open(string cn)
{
dbConnection = new Oracle.DataAccess.Client.OracleConnection(cn);
dbConnection.Open();
}
public void OpenConn(string cn)
{
dbConnection = new Oracle.DataAccess.Client.OracleConnection(cn);
dbConnection.Open();
}
public void Close()
{
if (cmd != null)
{
cmd.Dispose();
dbConnection.Close();
dbConnection.Dispose();
}
}
//直接运行SQL语句
public void dosql(string sql)
{
try
{
cmd = dbConnection.CreateCommand();
cmd.CommandText = sql;
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
}
catch (Exception ex) // catches any error
{
throw new Exception(“出错:“+ex.Message.ToString());
// string s = ex.Message.ToString();
}
}
public int ExecuteSql(string[] strSql)
{
//用途:批执行SQL语句,如果中间出错,事物回滚。
//输入参数:strSql[] —— sql字符串数组
//输出结果:如果执行成功返回“”,如果出错返回经过处理的出错信息。
int S_Temp = 1;
OracleTransaction Trans;
Open();
cmd = dbConnection.CreateCommand();
Trans = dbConnection.BeginTransaction();
try
{
//依次执行传入的SQL语句
for (int i = 0; i < strSql.Length; i++)
{
if (strSql[i].ToString() != ““)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4490 2013-06-13 10:58 RFReader.TestApp\cdcontrol\cdcontrol.csproj
文件 257 2013-06-13 10:58 RFReader.TestApp\cdcontrol\cdcontrol.csproj.vspscc
文件 51754 2013-06-13 10:58 RFReader.TestApp\cdcontrol\oracleclass\Oracledata.cs
文件 1393 2013-06-13 10:58 RFReader.TestApp\cdcontrol\Properties\AssemblyInfo.cs
文件 705 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\About_Dialog.cs
文件 4147 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\About_Dialog.Designer.cs
文件 6011 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\About_Dialog.resx
文件 5274 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Address_Dialog.cs
文件 13909 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Address_Dialog.Designer.cs
文件 6011 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Address_Dialog.resx
文件 3543 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Antenna_Dialog.cs
文件 16858 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Antenna_Dialog.Designer.cs
文件 5814 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Antenna_Dialog.resx
文件 2402 2013-06-13 11:17 RFReader.TestApp\RFReader.TestApp\Config_Dialog.cs
文件 4936 2013-06-13 11:17 RFReader.TestApp\RFReader.TestApp\Config_Dialog.Designer.cs
文件 5814 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Config_Dialog.resx
文件 1404 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\GetTagID_Dialog.cs
文件 6024 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\GetTagID_Dialog.Designer.cs
文件 5814 2013-06-13 10:59 RFReader.TestApp\RFReader.TestApp\GetTagID_Dialog.resx
文件 3027 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\HfConfig_Dialog.cs
文件 9122 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\HfConfig_Dialog.Designer.cs
文件 6011 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\HfConfig_Dialog.resx
文件 7623 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\IpAddress_Dialog.cs
文件 10990 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\IpAddress_Dialog.Designer.cs
文件 5814 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\IpAddress_Dialog.resx
文件 1558 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Kill_Dialog.cs
文件 6118 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Kill_Dialog.Designer.cs
文件 6011 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Kill_Dialog.resx
文件 2183 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Lock_Dialog.cs
文件 8312 2013-06-13 10:58 RFReader.TestApp\RFReader.TestApp\Lock_Dialog.Designer.cs
............此处省略106个文件信息
相关资源
- 简易水准网平差程序
- 手写签名采集识别系统
- NotifyIcon
- GPS NMEA协议解析.NET库
- RC500制作读卡器的全套电路及PCB板图
- RFID.h RC522
- GPS广播星历计算卫星概略位置
- DevExpressCrack-master.zip
- 打包管理工具 Asset Bundle Manager
- Loic源码-DDOS/DOS测试
- 空间后方交会求外方位元素
- 手写签名图片,可保存为图片或到数
- WinRemoteDesktop 简易远程桌面管理工具
- 自动取款机管理系统
- 实现一个界面跳转到另一个界面
- PC与三菱FX系列PLC串口通讯库和exampl
- framwork赛马程序
- 西门子(SIEMENS)PLC编程软件Step7_V5.
- .Net人事管理系统开发教程
- Snap7西门子采集
- 信息论 香农,费诺,霍夫曼编码
- stm32和rfid读卡器模块
- NAudio.dll
- 基于ArcEngine的栅格计算器开发
- NET反混淆—de4dot-Reactor5.0
- 本地检索系统
- 简单的数字虚拟键盘
- myKTV项目
- B*寻路算法 C Sharp实现
- 水晶报表8.0基本使用手册中文
评论
共有 条评论