AccessÊý¾Ý¿âÔÚC#.netϵĴ洢·¾¶ÎÊÌâ
¼´Ê¹ÎÒ½«Êý¾Ý¿â·ÅÔÚÏîÄ¿ÄÚ½¨µÄÎļþ¼ÐdbÏ£¬¿ÉÊǽøÐд洢²Ù×÷µÄʱºò£¬Êý¾Ý±íûÓÐÈκα仯¡£ºóÀ´·¢ÏÖ´¢´æ¸Ä±ä·¢ÉúÔÚbin\\debug\\dbĿ¼ÏµÄÊý¾Ý¿âÖУ¬Õâ¸öÊý¾Ý¿âÊÇÔÚ³ÌÐòÔËÐÐʱ×Ô¶¯¸´ÖƹýÈ¥µÄ£¬¿ÉÊÇΪʲô´æ´¢±ä»¯Ã»Óз´Ó¦µ½ÍâÃæÏîÄ¿ÄÚµÄÊý¾Ý¿âdbÏÂÄØ£¿ÎÒÏëÁ¬½Ó×Ö·û´®ÖÐdatasourceÖеÄdatadirectory´æÔÚһЩÐþ»ú£¬ÓÚÊÇÎÒÕÒµ½Ò»¸ö¸Ä±ä´æ´¢Â·¾¶µÄ·½·¨£¬ÒÔʵÏÖ¶ÔÊý¾Ý¿â²Ù×÷ÄÜÂäʵµ½ÄãÖ¸¶¨µÄÏîÄ¿Êý¾Ý¿âÎļþÖС£
//¸Ä±äÊý¾Ý¿â´æ´¢Â·¾¶
¡¡¡¡ string p = AppDomain.CurrentDomain.BaseDirectory;//»ñÈ¡²Ù×÷µÄÖ±½Ó·¾¶
¡¡¡¡ //ÖØж¨Î»Êý¾Ý¿â
¡¡¡¡ if (p.IndexOf("\\bin\\") > 0)
¡¡¡¡ {
¡¡¡¡ if (p.EndsWith("\\bin\\Debug\\"))
¡¡¡¡ p = p.Replace("\\bin\\Debug", "");
¡¡¡¡ if (p.EndsWith("\\bin\\Release\\"))
¡¡¡¡ p = p.Replace("\\bin\\Release", "");
¡¡¡¡ }
¡¡¡¡ if (!p.EndsWith("App_Data\\"))
¡¡¡¡ p = p + "db\\";
¡¡¡¡ p = p + "App_Data\\";//ÕâÀï¿ÉÒÔÖ¸¶¨ÏîÄ¿Êý¾Ý¿âÎļþ¼ÐÃû
¡¡¡¡ AppDomain.CurrentDomain.SetData("DataDirectory", p);
¡¡¡¡ Application.EnableVisualStyles();
¡¡¡¡ Application.SetCompatibleTextRenderingDefault(false);
¡¡¡¡Æäʵ×îºóbin\\debug\\dbÏ»¹ÊÇ»áÓÐÒ»·ÝÊý¾Ý¿âÎļþ£¬µ«ÊǽøÐеIJÙ×÷¿ÉÒÔÂäʵ·´Ó¦µ½ÍâÃæÏîÄ¿ÀïÊý¾Ý¿âÎļþÁË¡£App.configÎļþÀïµÄÁ¬½Ó×Ö·û´®Îª£ºconnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|Êý¾Ý¿âÃû.mdb"
¡£
Ïà¹ØÎĵµ£º
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using  ......
C#ʹÓÃSQLiteÊý¾Ý¿â(asp.net/winform)
2009Äê1ÔÂ7ÈÕ
ÆÀÂÛ
·¢±íÆÀÂÛ
SQLite
ÊÇÄ¿Ç°±È½ÏÁ÷ÐеÄÒ»¸ö¿ªÔ´¡¢Ãâ·ÑµÄСÐ͵ÄEmbeddable RDBMS(¹ØϵÐÍÊý¾Ý¿â)£¬ÓÃCʵÏÖ£¬ÄÚ´æÕ¼ÓýÏС£¬Ö§³Ö¾ø´óÊýµÄSQL92±ê×¼£¬¸ö±ð²»Ö§³ÖµÄÇé¿ö£¬ÔÚÕâÀï
˵Ã÷
¶Ô¸÷ÖÖÓïÑÔµÄÖ§³ÖÒ²±È½Ï²»´í£¬wrapperºÜ¶à¡ ......
ÏÂÃæÊÇcommond:
MySQLCommand cmd;
cmd = new MySQLDriverCS.MySQLCommand("DROP TABLE IF EXISTS test.mysqldrivercs_test",conn);
cmd.ExecuteNonQuery();
cmd.Dispose();
ÏÂÃæÊÇinsert:
string Value = "Value";
int SettingID = 1;
new MySQLInsertCommand(conn,
new object[,] {{"SettingID",SettingID},{"S ......
ʹÓÃÁËTCP/IP£¬ADO¼°XML£¨ÐèÒª°²×°Microsoft XML 4.0¡££©¡£·Ö·þÎñÆ÷ºÍ¿Í»§¶ËÁ½²¿·Ö£¬·þÎñÆ÷¿ÉÒÔ¶àÓû§Í¬Ê±Á¬½Ó¡£Ô¶³ÌÁ¬½ÓAccessÊý¾Ý¿âÓкܶ෽·¨£¬ÎÒÒÔÇ°ÒѾ±È½Ï¾ßÌåµÄ»Ø´ð¹ý£¨¼ûÏÂÃæËùÁеÄ5ÖÖ·½·¨£©£¬ÎÒÏÖÔÚÕâ¸öÀý×ÓÊôÓÚÆäÖеĵڣ³ÖÖ·½·¨£¨²»ÐèҪʹÓÃRDS»òWeb·þÎñÆ÷£©¡£
Ô¶³ÌÁ¬½ÓaccessÊý¾Ý¿âµÄ¼¸¸ö·½·¨£º
£±£®½¨Á¢VPN ......
ÊìϤSQL SERVER 2000µÄÊý¾Ý¿â¹ÜÀíÔ±¶¼ÖªµÀ£¬ÆäDTS¿ÉÒÔ½øÐÐÊý¾ÝµÄµ¼Èëµ¼³ö£¬Æäʵ£¬ÎÒÃÇÒ²¿ÉÒÔʹÓÃTransact-SQLÓï¾ä½øÐе¼Èëµ¼³ö²Ù×÷¡£ÔÚTransact-SQLÓï¾äÖУ¬ÎÒÃÇÖ÷ҪʹÓÃOpenDataSourceº¯Êý¡¢OPENROWSET º¯Êý£¬¹ØÓÚº¯ÊýµÄÏêϸ˵Ã÷£¬Çë²Î¿¼SQLÁª»ú°ïÖú¡£ÀûÓÃÏÂÊö·½·¨£¬¿ÉÒÔÊ®·ÖÈÝÒ×µØʵÏÖSQL SERVER¡¢ACCESS¡¢EXCELÊý¾Ýת»»£ ......