資源簡介
用CodeSmith 生成的項目文件和框架?
網站可免費發布游戲。支持會員和在線購買會員功能,和自動發郵件的設置
有經驗和積分管理
界面簡介美觀。
用戶名和密碼分別人test@51aspx.com ;51aspx
網站可免費發布游戲。支持會員和在線購買會員功能,和自動發郵件的設置
有經驗和積分管理
界面簡介美觀。
用戶名和密碼分別人test@51aspx.com ;51aspx

代碼片段和文件信息
/**
Company:
Name:?Access數據庫訪問助手類
Author:?lihaibo
DateTime:?2009-5-7?16:23:22
*/
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Data;
using?System.Data.OleDb;
using?System.Configuration;
namespace?AccessDAL
{
????public?class?AccessHelper
????{
//連接字符串
????????private?static?string?StrCon?=?ConfigurationManager.ConnectionStrings[“Access“].ConnectionString;
#region?查詢返回OleDbDataReader
????????public?static?OleDbDataReader?GetReader(string?sql?OleDbParameter[]?parms)
????????{
OleDbConnection?con?=?new?OleDbConnection(StrCon);????????????
????????????OleDbCommand?com?=?new?OleDbCommand(sql?con);
????????????com.CommandType?=?CommandType.Text;
????????????if?(parms?!=?null)
????????????{
????????????????com.Parameters.AddRange(parms);
????????????}
con.Open();
????????????OleDbDataReader?reader?=?com.ExecuteReader(CommandBehavior.CloseConnection);
//此處不能關con用完時記得關閉reader
????????????com.Parameters.Clear();
????????????return?reader;
????????}
//重載
????????public?static?OleDbDataReader?GetReader(string?sql)
????????{
????????????return?GetReader(sql?null);
????????}
#endregion
#region?查詢返回DataSet
????????public?static?DataSet?GetDataSet(string?sql?OleDbParameter[]?parms)
????????{
????????????DataSet?ds?=?new?DataSet();???
????????????????try
????????????????{
using?(OleDbConnection?con?=?new?OleDbConnection(StrCon))
???????????? {
OleDbCommand?com?=?new?OleDbCommand(sql?con);
com.CommandType?=?CommandType.Text;
if?(parms?!=?null)
{
com.Parameters.AddRange(parms);
}
OleDbDataAdapter?adapter?=?new?OleDbDataAdapter(com);?
con.Open();
adapter.Fill(ds);
com.Parameters.Clear();?????
con.Close(); ???????????????
???????????????? }?
}
????????????????catch?(Exception?e)
????????????????{
????????????????????string?ex?=?e.Message;
????????????????}???????????
????????????return?ds;
????????}
//重載
????????public?static?DataSet?GetDataSet(string?sql)
????????{
????????????return?GetDataSet(sql?null);
????????}
#endregion
#region?增、刪、改
????????public?static?int?ExcuteSQL(string?sql?OleDbParameter[]?parms)
????????{
????????????int?rows?=?-1;????????????
????????????????try
????????????????{
using?(OleDbConnection?con?=?new?OleDbConnection(StrCon))
{???????????????????
OleDbCommand?com?=?new?OleDbCommand(sqlcon);
com.CommandType?=?CommandType.Text;
if?(parms?!=?null)
{
com.Parameters.AddRange(parms);
}
con.Open();
rows?=?com.ExecuteNonQuery();
com.Parameters.Clear();??????
con.Close(); ??????????????
???????????????? }
}
catch?(Exception?e)
????????????????{
????????????????????string?ex?=?e.Message;
????????????????}????????????
????????????return?rows?;
????????}
//重載
????????public?static?int?ExcuteSQL(string?s
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4259??2009-06-10?22:38??youxifabu\AccessDAL\AccessDAL.csproj
?????文件???????5186??2009-05-31?16:28??youxifabu\AccessDAL\AccessHelper.cs
?????文件??????34816??2009-06-18?11:16??youxifabu\AccessDAL\bin\Debug\AccessDAL.dll
?????文件??????71168??2009-06-18?11:16??youxifabu\AccessDAL\bin\Debug\AccessDAL.pdb
?????文件??????17920??2009-06-18?11:16??youxifabu\AccessDAL\bin\Debug\Config.dll
?????文件??????42496??2009-06-18?11:16??youxifabu\AccessDAL\bin\Debug\Config.pdb
?????文件???????6144??2009-06-18?11:16??youxifabu\AccessDAL\bin\Debug\Email.dll
?????文件??????17920??2009-06-18?11:16??youxifabu\AccessDAL\bin\Debug\Email.pdb
?????文件???????6656??2009-06-18?00:48??youxifabu\AccessDAL\bin\Debug\IDAL.dll
?????文件???????7680??2009-06-18?00:48??youxifabu\AccessDAL\bin\Debug\IDAL.pdb
?????文件??????20992??2009-06-16?16:16??youxifabu\AccessDAL\bin\Debug\Models.dll
?????文件?????103936??2009-06-16?16:16??youxifabu\AccessDAL\bin\Debug\Models.pdb
?????文件??????33792??2009-08-17?10:05??youxifabu\AccessDAL\bin\Release\AccessDAL.dll
?????文件??????58880??2009-08-17?10:05??youxifabu\AccessDAL\bin\Release\AccessDAL.pdb
?????文件??????16384??2009-08-17?10:05??youxifabu\AccessDAL\bin\Release\Config.dll
?????文件??????34304??2009-08-17?10:05??youxifabu\AccessDAL\bin\Release\Config.pdb
?????文件???????6144??2009-08-17?10:05??youxifabu\AccessDAL\bin\Release\Email.dll
?????文件??????15872??2009-08-17?10:05??youxifabu\AccessDAL\bin\Release\Email.pdb
?????文件???????7168??2009-08-17?10:05??youxifabu\AccessDAL\bin\Release\IDAL.dll
?????文件???????7680??2009-08-17?10:05??youxifabu\AccessDAL\bin\Release\IDAL.pdb
?????文件??????19456??2009-08-17?10:05??youxifabu\AccessDAL\bin\Release\Models.dll
?????文件??????87552??2009-08-17?10:05??youxifabu\AccessDAL\bin\Release\Models.pdb
?????文件???????2351??2009-05-07?19:12??youxifabu\AccessDAL\obj\AccessDAL.csproj.FileListAbsolute.txt
?????文件????????850??2009-06-12?21:59??youxifabu\AccessDAL\obj\Debug\AccessDAL.csproj.FileListAbsolute.txt
?????文件????????789??2009-06-03?21:39??youxifabu\AccessDAL\obj\Debug\AccessDAL.csproj.GenerateResource.Cache
?????文件??????34816??2009-06-18?11:16??youxifabu\AccessDAL\obj\Debug\AccessDAL.dll
?????文件??????71168??2009-06-18?11:16??youxifabu\AccessDAL\obj\Debug\AccessDAL.pdb
?????文件????????180??2009-06-18?11:16??youxifabu\AccessDAL\obj\Debug\AccessDAL.Properties.Resources.resources
?????文件???????7680??2009-06-16?10:18??youxifabu\AccessDAL\obj\Debug\Refactor\AccessDAL.dll
?????文件??????12554??2009-06-18?11:16??youxifabu\AccessDAL\obj\Debug\ResolveAssemblyReference.cache
............此處省略411個文件信息
- 上一篇:校園失物招領系統畢業論文
- 下一篇:psasp潮流計算手冊
評論
共有 條評論