資源簡介
西門子網絡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?????????????????{
????????????????????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個文件信息
- 上一篇:EF(oracel數據庫的增、刪、改、查)
- 下一篇:WPF path動畫
評論
共有 條評論