惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
S
Securelist
P
Proofpoint News Feed
D
DataBreaches.Net
Cisco Talos Blog
Cisco Talos Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Project Zero
Project Zero
A
About on SuperTechFans
罗磊的独立博客
WordPress大学
WordPress大学
月光博客
月光博客
Latest news
Latest news
C
Cyber Attacks, Cyber Crime and Cyber Security
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - 三生石上(FineUI控件)
F
Fortinet All Blogs
W
WeLiveSecurity
Attack and Defense Labs
Attack and Defense Labs
V
Visual Studio Blog
Blog — PlanetScale
Blog — PlanetScale
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
P
Privacy International News Feed
AI
AI
博客园 - 司徒正美
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence
Help Net Security
Help Net Security
T
Tor Project blog
V
Vulnerabilities – Threatpost
C
Cisco Blogs
I
Intezer
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
MyScale Blog
MyScale Blog
雷峰网
雷峰网
MongoDB | Blog
MongoDB | Blog
Forbes - Security
Forbes - Security
V
V2EX
Apple Machine Learning Research
Apple Machine Learning Research
T
Threat Research - Cisco Blogs
B
Blog RSS Feed
博客园 - 叶小钗
N
News and Events Feed by Topic
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Simon Willison's Weblog
Simon Willison's Weblog
C
CERT Recently Published Vulnerability Notes
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic

博客园 - Cavingdeep

用metaclass实现AOP风格的Profiler Singleton implementation using metaclass 初试IronPython与.NET的集成 Refactoring as a way to improve the existing design 用metaclass来实现AOP 不该用Generics实现Abstract Factory的理由 新兴XML处理方法VTD-XML介绍 Performance Tips I DCG 2.0.72 (Beta1) 发布了 NUnit发布2.2.3兼容.NET 2.0 RTM 如果你想拥有一个可嵌入式模板引擎…… 改进ASP语法打造更高效的模板语言II 改进ASP语法打造更高效的模板语言 XML的特征以及一些用途 深入XML系列技术 DbHelper at Tigris SQLite系列 集合的初始容量与性能 DbHelper basic usage
Release of DbHelper 1.2.1
Cavingdeep · 2005-11-03 · via 博客园 - Cavingdeep

DbHelper增加了两个Build方法分别构建IDbCommand与IDataParameter,同时增加了接受IDbCommand的接 口,这样做是为了在需要重复执行某个Command时不需要每次都重新构建Command浪费效率,现在可以用Build方法先构建出Command对 象,然后在循环中执行这个command,如下示例。

 1IDbHelper helper = new SqliteHelper(this.connection);
 2
 3IDbCommand insertCommand = helper.BuildCommand(
 4   "INSERT INTO Test VALUES(NULL, @num, @r_date, @data)",
 5   1, DateTime.Now, new byte[0]);
 6
 7SQLiteConnection con = new SQLiteConnection();
 8con.ConnectionString = this.connection.ConnectionString;
 9
10con.Open();
11
12IDbTransaction transaction = con.BeginTransaction(
13   IsolationLevel.ReadUncommitted);
14insertCommand.Transaction = transaction;
15
16try {
17   for (int i = 0; i < 100; i++{
18      helper.ExecuteCommand(insertCommand, i + 1, DateTime.Now, null);
19   }

20   transaction.Commit();
21}
 catch {
22   transaction.Rollback();
23}
 finally {
24   con.Close();
25}

26

关于DbHelper,请参看:

http://cavingdeep.cnblogs.com/category/37490.html

下载及Announcements

http://dbhelper.tigris.org