Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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#ÖÐtimerÀà  ÔÚC#Àï¹ØÓÚ¶¨Ê±Æ÷Àà¾ÍÓÐ3¸ö   
1.¶¨ÒåÔÚSystem.Windows.FormsÀï   
2.¶¨ÒåÔÚSystem.Threading.TimerÀàÀï    
3.¶¨ÒåÔÚSystem.Timers.TimerÀàÀï  
System.Windows.Forms.TimerÊÇÓ¦ÓÃÓÚWinFormÖеģ¬ËüÊÇͨ¹ýWindowsÏûÏ¢»úÖÆÊµÏ ......

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(C#)ÖÐstringÓëstringBuilderµÄÇø±ð

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

ASP.NET ·þÎñÆ÷¿Ø¼þäÖȾµ½¿Í»§¶ËÖ®ºó¶ÔÓ¦µÄHTML±êÇ©

·þÎñÆ÷¿Ø¼þ        html±ê¼Ç
label----------<span/>
button---------<input type="submit"/>
textbox--------<input type="text"/>
linkbutton-----<a href="javascript:" />
imagebutton----<input type="image"/>
hyperlink------<a />
......

asp.netÖг£ÓõÄ26¸öÓÅ»¯ÐÔÄܵķ½·¨

asp.netÖг£ÓõÄ26¸öÓÅ»¯ÐÔÄܵķ½·¨
 
1. Êý¾Ý¿â·ÃÎÊÐÔÄÜÓÅ»¯¡¡
¡¡
Êý¾Ý¿âµÄÁ¬½ÓºÍ¹Ø±Õ
·ÃÎÊÊý¾Ý¿â×ÊÔ´ÐèÒª´´½¨Á¬½Ó¡¢´ò¿ªÁ¬½ÓºÍ¹Ø±ÕÁ¬½Ó¼¸¸ö²Ù×÷¡£ÕâЩ¹ý³ÌÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»»ÐÅÏ¢ÒÔͨ¹ýÉí·ÝÑéÖ¤£¬±È½ÏºÄ·Ñ·þÎñÆ÷×ÊÔ´¡£ASP.NETÖÐÌṩÁËÁ¬½Ó³Ø(Connection Pool)¸ÄÉÆ´ò¿ªºÍ¹Ø±ÕÊý¾Ý¿â¶ÔÐÔÄܵÄÓ°Ï졣ϵͳ½«Óû§µÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ