Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C#ʹÓÃSQLiteÊý¾Ý¿â(asp.net/winform)

C#ʹÓÃSQLiteÊý¾Ý¿â(asp.net/winform)
2009Äê1ÔÂ7ÈÕ
ÆÀÂÛ
·¢±íÆÀÂÛ


SQLite
ÊÇÄ¿Ç°±È½ÏÁ÷ÐеÄÒ»¸ö¿ªÔ´¡¢Ãâ·ÑµÄСÐ͵ÄEmbeddable RDBMS(¹ØϵÐÍÊý¾Ý¿â)£¬ÓÃCʵÏÖ£¬ÄÚ´æÕ¼ÓýÏС£¬Ö§³Ö¾ø´óÊýµÄSQL92±ê×¼£¬¸ö±ð²»Ö§³ÖµÄÇé¿ö£¬ÔÚÕâÀï
˵Ã÷
¶Ô¸÷ÖÖÓïÑÔµÄÖ§³ÖÒ²±È½Ï²»´í£¬wrapperºÜ¶à¡£

Google
Gears ¡¢Mozilla
ºÍ Adobe AIR ¶¼ÔÚʹÓÃsqlite£¬Ó¦¸Ã˵Ã÷Æ仹ÊǺܲ»´íµÄ
SQLite µÄ¹Ø¼ü×ÖÁÐ±í£¬ÕâÀï
Ö§³ÖµÄsqlÓï·¨£¬ÔÚÕâÀï
ÔÚ .NET
ÀïÃæʹÓà SQLite
£¬ ÎÒÕâÀïʹÓõÄwrapperÊÇ System.Data.SQLite
£¬ËüÖ»ÐèÒªÒ»¸ödll,½Ó¿Ú·ûºÏADO.Net 2.0µÄ¶¨Òå,ÐÔÄÜÒ²²»´í,NHibernateÓõÄÒ²ÊÇËü£¬Ä¿Ç°Ö§³ÖADO.NET 3.5ÁË£¬Ö§³Ö¼¯³ÉÔÚ VS2005 ºÍ VS2008ÀïÃ棬¶øÇÒÖ§³Öwince£¬ÊǸöÁÁµã
ÒòΪ·ûºÏADO.NETµÄ¹æ·¶£¬ËùÒÔʹÓ÷½Ê½£¬»ù±¾ºÍ SqlClient
, OleDb
µÈÔ­ÉúµÄÒ»ÖÂ
using System.Data;
using System.Data.SQLite;
//...
using (SQLiteConnection cn = new SQLiteConnection(
"Data Source=Test.db3;Pooling=true;FailIfMissing=false")
)
{
//ÔÚ´ò¿ªÊý¾Ý¿âʱ£¬»áÅжÏÊý¾Ý¿âÊÇ·ñ´æÔÚ£¬Èç¹û²»´æÔÚ£¬ÔòÔÚµ±Ç°Ä¿Â¼Ï´´½¨Ò»¸ö
cn.Open();
using (SQLiteCommand cmd = new SQLiteCommand())
{
cmd.Connection = cn;
//½¨Á¢±í£¬Èç¹û±íÒѾ­´æÔÚ£¬Ôò±¨´í
cmd.CommandText = "CREATE TABLE [test] (id int, name nvarchar(20))";
cmd.ExecuteNonQuery();
//²åÈë²âÊÔÊý¾Ý
for (int i = 2; i < 5; i++)
{
cmd.CommandText = string.Format("INSERT INTO [test] VALUES ({0}, 'ÖÐÎIJâÊÔ')", i);
cmd.ExecuteNonQuery();
}
for (int i = 5; i < 10; i++)
{
cmd.CommandText = string.Format("INSERT INTO [test] VALUES ({0}, 'English Test')", i);
cmd.ExecuteNonQuery();
}
//¶ÁÈ¡Êý¾Ý
cmd.CommandText = "SELECT * from [test]";
using (SQLiteDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection))
{
while (dr.Read())
{
Console.WriteLine("µÚ{0} Ìõ£º{1}&q


Ïà¹ØÎĵµ£º

C#ÓëC++¡¢JAVAµÄÇø±ð


#(¶Á×ö "C sharp")ÊÇ΢Èí¹«Ë¾ÔÚÈ¥ÄêÁùÔ·¢²¼µÄÒ»ÖÖеıà³ÌÓïÑÔ,²¢¶¨ÓÚÔÚ΢ÈíÖ°Òµ¿ª·¢ÕßÂÛ̳(PDC)ÉϵÇ̨ÁÁÏà.C#ÊÇ΢Èí¹«Ë¾Ñо¿Ô±Anders HejlsbergµÄ×îгɹû.C#¿´ÆðÀ´ÓëJavaÓÐמªÈ˵ÄÏàËÆ;Ëü°üÀ¨ÁËÖîÈçµ¥Ò»¼Ì³Ð,½çÃæ,ÓëJava¼¸ºõͬÑùµÄÓï·¨,ºÍ±àÒë³ÉÖмä´úÂëÔÙÔËÐеĹý³Ì.µ«ÊÇC#ÓëJavaÓÐ×ÅÃ÷ÏԵIJ»Í¬,Ëü½è¼øÁËDelphiµÄÒ»¸ ......

ASP.NET WebÓ¦ÓóÌÐòдEventLog³ö´íµÄ½â¾ö·½°¸

×î½üÔÚ¶ÔÓ¦Ò»¸öASP.NET WebÓ¦ÓóÌÐòBugµÄʱºò£¬ÎªÁ˵÷²éÔËÐл·¾³ÖоßÌåµÄBugÓÚÊDzéÔÄÁËһϴíÎóÈÕÖ¾¡£
Õâ¸ö³ÌÐòµÄ´íÎóÈÕÖ¾ÊÇÖ±½Ó±£´æÔÚÒ»¸öÎı¾ÎļþÖеģ¬½á¹û·¢ÏÖ¾ÍËãÊdzö´íÒ²²»»áÁôÏÂÈκκۼ£¡£
Ò»µ÷ÊÔ£¬¾¹È»ÊÇ°Ñ´íÎóÈÕÖ¾µÄ±£´æ·¾¶¸øд´íÁË¡£My God£¡
°Ñ·¾¶¸ÄÁË£¬×ªÄîÒ»ÏëÏ´γö´íÔÙ²»±£´æÔõô°ì£¿Ë­ÖªµÀÕæÕýµÄ»·¾³À ......

ASP.NET,oracle¿Í»§¶ËÁ¬½Óʧ°Ü

OCIEnvNlsCreate ʧ°Ü£¬·µ»Ø´úÂëΪ -1£¬µ«´íÎóÏûÏ¢Îı¾²»¿ÉÓá£
2009-09-20 02:10
“System.Data.OracleClient ÐèÒª Oracle ¿Í»§¶ËÈí¼þ 8.1.7 »ò¸ü¸ß°æ±¾ ”
µÄ´¦Àí·½·¨Ó¦¸ÃÏàËÆ£¬Ã»¾ßÌåÊÔ¹ý¡£
¸øoracle/ora92µÄĿ¼¼ÓÉÏnetwork serviceÓû§µÄȨÏ޾ͿÉÒÔÁË¡£
·½·¨£ºÓÒ»÷ora92£¬Ñ¡ÔñÊôÐÔ£¬µã»÷“°²È«&rd ......

Asp.netÍøÕ¾¿ª·¢¼Ü¹¹Éè¼ÆÒªÇó


ÍøÕ¾ÎļþÃû£º
1¡¢ ÍøÕ¾ÎļþÃûÒÔ±ê×¼Ó¢Îĵ¥´ÊÃèÊöÒµÎñÄÚÈÝ¡£Èç¹û1¸öÓ¢Îĵ¥´ÊÎÞ·¨ÃèÊö£¬¿ÉÒÔÔö¼Ó2¸ö»òÕß3¸ö£¬µ«¾¡Á¿ÎªÍêÈ«µ¥´Ê£¬ÀýÈçarticle.aspx/ articleView.aspx /    articleList.aspx µÈ¡£
2¡¢ ÎļþÃû¾¡Á¿²»ÓÃÊý×ÖÃèÊö¡£
3¡¢ ÎļþÃû¾¡Á¿²»ÄÜÌ«³¤£¬ÒÔ²»³¬¹ý20¸ö×ÖĸΪÒË¡£
4¡¢ ͼƬÎļþÃû¾¡Á¿ÃèÊöÍ ......

ASP.NET(C#)ÖÐstringÓëstringBuilderµÄÇø±ð

 
ÔÚÏàͬ×Ö·û´®µÄÐí¶à²Ù×÷ÉÏ£¬Ê¹ÓÃStringBuilderÀà»á±ÈʹÓÃString¶ÔÏó¸üÓÐЧÂÊ¡£
 
 
 µ±Äã¶ÔÒ»¸östring¶ÔÏó¸³ÖµÊ±£¬Õâʱ»áÉú³ÉÒ»¸öÕâ¸ö¶ÔÏóµÄ¸±±¾£¬Èç¹ûÄ㸳ֵ¶à´ÎµÄ»°ÔÚϵͳÖоͻᱣ´æ¶à¸öÕâ¸ö¶ÔÏóµÄ¸±±¾£¬»á¶Ôϵͳ×ÊÔ´Ôì³ÉºÜ´óµÄÀË·Ñ£¬µ«ÊÇStringBuilder²»»á³öÏÈÉÏÊöÇé¿ö
StringÊý¾ÝÀàÐÍ´ú±íµÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ