- 浏览: 282733 次
- 性别:
- 来自: 深圳
文章分类
最新评论
-
iceblue123:
厉害,太感谢楼主了,第二种方法威武!
spring MVC 3.2中@ResponseBody返回乱码的完美解决方案 -
gaozi131:
感谢啊 折腾了一下午搞定
spring MVC 3.2中@ResponseBody返回乱码的完美解决方案 -
yenshen:
找了半天,问题终于解决了,感谢!
spring MVC 3.2中@ResponseBody返回乱码的完美解决方案 -
笑闯天下:
感觉效率不是很高啊 ,如果从数据库中取到的数据 还要去自己拼接 ...
java导出CSV文件 -
ajonjun:
http://viralpatel.net/
解决ckeditor html不显示,ckeditor 自动过滤html
The other day I found that there is a .NET wrapper for sqlite. sqlite is a very cool embeddable SQL-92 database engine. It's a single library that gives you a very fast, very scalable (2TB), single file, multi-user database. I thought the .NET wrapper is exceptionally handy because ADO is slow, and is hard to use (compared to this) and a HUGE overkill for smaller apps. It lets smaller apps have a real relational database without huge numbers of dependencies, complicated installs, or the complexity of ADO. Here is a really quick example program I wrote to try it out:
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using SQLite.NET; namespace WindowsApplication2 { /// <summary> /// Summary description for Form1. /// </summary> public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.ListBox listBox1; private System.ComponentModel.Container components = null; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Button button1; private SQLiteClient db; public Form1() { db = new SQLiteClient("test.db"); InitializeComponent(); UpdateList(); } public void UpdateList() { SQLiteResultSet results; results = db.Execute("select name, phone from people order by name;"); listBox1.Items.Clear(); foreach(ArrayList row in results.Rows) { listBox1.Items.Add(row[0]); } } protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.listBox1 = new System.Windows.Forms.ListBox(); this.textBox1 = new System.Windows.Forms.TextBox(); this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // listBox1 // this.listBox1.Location = new System.Drawing.Point(8, 8); this.listBox1.Name = "listBox1"; this.listBox1.Size = new System.Drawing.Size(136, 199); this.listBox1.TabIndex = 0; // // textBox1 // this.textBox1.Location = new System.Drawing.Point(192, 24); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(120, 20); this.textBox1.TabIndex = 1; this.textBox1.Text = "textBox1"; // // button1 // this.button1.Location = new System.Drawing.Point(320, 24); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(72, 16); this.button1.TabIndex = 2; this.button1.Text = "button1"; this.button1.Click += new System.EventHandler(this.button1_Click); // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(408, 349); this.Controls.Add(this.button1); this.Controls.Add(this.textBox1); this.Controls.Add(this.listBox1); this.Name = "Form1"; this.Text = "Form1"; this.ResumeLayout(false); } #endregion /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.Run(new Form1()); } private void button1_Click(object sender, System.EventArgs e) { db.Execute("insert into people values ('" + textBox1.Text.Replace("'","''") + "','111');"); UpdateList(); } } }
发表评论
-
20条ASP.NET常用语句非常实用
2009-12-22 23:39 13831.//弹出对话框.点击转向指定页面 Response.Wr ... -
C#/.NET主线程与子线程之间的关系
2009-12-22 23:10 2406以前一直没有在程序中写过总结,再翻开程序时却不知所云,所以我决 ... -
C#操作Excel,套用模板并对数据进行分页
2009-12-07 23:52 2187using System; using System.I ... -
动态生成缩略图
2009-12-07 23:49 1351Util.cs 的部分代码: //// <summa ... -
如何获取客户IE统计信息
2009-12-07 23:47 1044namespace Huawei.com { p ... -
运用API函数获取系统信息
2009-12-07 23:44 1112<HTML> <HEAD> ... -
WMI类-所有可用的WMI的类封装
2009-12-07 23:43 1701public class WMIClasses ... -
自己写的一个文件上传的类
2009-12-07 23:42 1074using System; using System.C ... -
文件操作工具类 FileUtility
2009-12-07 23:41 1280最近一直在研究 Smart Client 的 Smart Up ... -
C# 检查字符串,防SQL注入攻击
2009-12-07 23:16 1840例子里暂定为=号和'号 bool CheckParams ... -
获取本机机器名和登录WINDOWS的用户名?
2009-12-07 23:13 3640using System; using System. ... -
C# 禁用ctrl+alt+del
2009-12-07 23:09 1871using System; using System.R ... -
获取应用程序进程实例,
2009-12-07 23:07 1312/// <summary> ... -
如何在C#中使用全局鼠标、键盘Hook
2009-12-07 23:03 2667今天,有个同事问我,怎样在C#中使用全局钩子?以前写的全局钩子 ... -
把Web Control导出为Excel或Word
2009-12-07 22:58 1043/// <summary> /// 将Web ... -
C#编程忘记密码功能的实现方法
2009-12-07 22:55 2395以下是引用片段: int result = user.Ge ... -
C#实现USB接口的程序代码
2009-12-07 22:53 1944namespace ConsoleApplication1 ... -
Textarea标签封装为Web在线编辑器
2009-12-07 22:42 1098Editor.htm <textarea style ... -
定自已的格式化类
2009-12-07 22:20 828public class Vector:IFormatta ... -
调用winapi中的FlashWindow
2009-12-07 22:18 14431.引用 using System.Runtime.In ...
相关推荐
对于大量或结构化数据,可以考虑使用数据库,如SQLite、SQL Server等。VB.NET提供了ADO.NET库来与数据库交互,包括`SqlConnection`, `SqlCommand`, `SqlDataReader`等类。 9. **文件流与缓冲** `FileStream`可以...
Chapter 4, Using .NET Standard Types, is about commonly used .NET Core types that are part of .NET Standard and how they are related to C#. You will learn about the .NET Standard class library ...
DbLinq is THE LINQ provider that allows to use ...DbLinq.Sqlite.dll: SQLite support, using either the System.Data.SQLite or Mono.Data.Sqlite drivers. DbLinq.SqlServer.dll: Microsoft SQL Server support.
Store data and system settings locally with SQLite Use app bars for commands and the settings charm for Help options Present notifications as tile updates, badges, or toast popups Help users visualize...
Bug with using TVirtualQuery with TVirtualTable is fixed Bug with processing NULL values in the Loader component is fixed Bug with executing a query after executing a batch command is fixed Bug ...
Build hybrid apps using the Razor Template Engine and create Razor Models that communicate with a SQLite database Use location based features within your app to display the user's current location ...
Build hybrid apps using the Razor Template Engine and create Razor Models that communicate with a SQLite database Use location based features within your app to display the user's current location ...
通过ADO.NET,我们可以连接到各种数据库,如SQL Server、Oracle或SQLite,并执行SQL语句进行数据操作。此外,Entity Framework是一个ORM(对象关系映射)框架,能够简化数据库操作,让开发者可以使用C#对象直接操作...
- Attach SQLite databases to managers in your scene - No need to move files around for mobile devices! - Simple and efficient access to data using customizable classes or write your own SQL statements...
Using UniDAC with its server-independent interface is the best way to create cross-database applications. UniDAC gives outstanding flexibility and independence to your projects. 本版本支持以下 IDE...
compatibility with older or less security conscience applications. We ; recommending using the production ini in production and testing environments. ; ...
Using UniDAC with its server-independent interface is the best way to create cross-database applications. UniDAC gives outstanding flexibility and independence to your projects. 本版本支持以下 IDE:...
Universal Data Access Components (UniDAC) is a powerful library of nonvisual cross-database data access components for Delphi, Delphi for .NET, C++Builder, and Free Pascal. The UniDAC library is ...
Learn about Python’s database API and how to use a variety of database systems with Python, including MySQL, Postgres, and SQLite Core Python Programming delivers Systematic, expert coverage of ...
*asa* *ase* *ingres* *interbase* *sqlite* *sqlsrv* *ora* *db2* 1. Overview |dbext-overview| 2. Installation |dbext-install| 3. Configuration |dbext-configure| 3.1 Displaying Results |dbext...
A Quick SQLite Primer Start at the Beginning Setting the Table Makin’ Data What Goes Around Comes Around Raw Queries Regular Queries Building with Builders Using Cursors Data, Data, Everywhere ■...
A: NBearLite is a .NET 2.0 data access component which supports MsAccess, SqlServer, Oracle, Sqlite, MySql, PostgreSql databases. Q: Is NBearLite an O/R Mapping component? A: No. Q: Then what are ...
通过学习这些知识,开发者可以高效地与各种数据库系统进行交互,如SQL Server、MySQL、SQLite或Oracle等。 首先,让我们深入理解C#连接数据库的基本过程。在C#中,我们通常使用ADO.NET库来实现这一目标。ADO.NET...
... Mehdi Achour ...74. Using PHP Manual CHM Edition 75. The Full Text Search 76. Specialities of this Edition 77. Integrating the PHP Manual 78. Skin development 79. CHM Edition Credits
PHP,即...74. Using PHP Manual CHM Edition 75. The Full Text Search 76. Specialities of this Edition 77. Integrating the PHP Manual 78. Skin development 79. CHM Edition Credits