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

ASP.NETµÄACCESSÊý¾Ý¿â²Ù×÷Àà

//private string datapatch = ConfigurationSettings.AppSettings["acessconn"];//Êý¾Ý¿âµØÖ· 
private string datapatch = "db/global.asa";//Êý¾Ý¿âµØÖ· 
/// 
/// È¡µÃdataset 
// 
/// ²éѯÓï¾ä 
/// 
public DataSet GetDataSet(string Commandtext) 

string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0; " + 
"Data Source=" + Server.MapPath(datapatch); 
string strCommandText = Commandtext; 
OleDbConnection myConnection = new OleDbConnection(strConnection); 
myConnection.Open(); 
OleDbDataAdapter myAdpater = new OleDbDataAdapter(strCommandText,myConnection); 
OleDbCommandBuilder myBuilder = new OleDbCommandBuilder(myAdpater); 
DataSet myDataset = new DataSet(); 
myAdpater.Fill(myDataset); 
myConnection.Close(); 
return myDataset; 

/// 
/// È¡µÃ±í 
/// 
/// ²éѯÓï¾ä 
/// 
public DataTable GetDataTable(string Commandtext) 

string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0; " + 
"Data Source=" + Server.MapPath(datapatch); 
string strCommandText =Commandtext; 
OleDbConnection myConnection = new OleDbConnection(strConnection); 
myConnection.Open(); 
OleDbDataAdapter myAdpater = new OleDbDataAdapter(strCommandText,myConnection); 
OleDbCommandBuilder myBuilder = new OleDbCommandBuilder(myAdpater); 
DataSet myDataset = new DataSet(); 
myAdpater.Fill(myDataset); 
DataTable mytable = myDataset.Tables[0]; 
myConnection.Close(); 
return mytable; 

/// 
/// È¡µÃijÐеÄijÁеÄÖµ 
/// 
/// ÁеÄÃû³Æ 
/// ËùÊô±íÃû 
/// ±íµÄÖ÷¼ü 
/// ÁÐËùÊôµÄÖ÷¼üÖµ 
/// 
public string GetDataColum(string strColumnName,string strTableName,string strColumnkey,string strColumnValue) 

string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0; " +


Ïà¹ØÎĵµ£º

Access ·ÖÒ³²éѯ

   ×Ô¼º×öµÄÒ»¸ö.net´íÎóÊÕ¼¯£¬ÊÕ¼¯ÕûÕ¾µÄ500´íÎó£¬ÓõÄaccessÊý¾Ý¿â¡£Êý¾Ý¹ý20000ºó£¬Ê¹Óô«Í³µÄSELECT TOP 10 * from TABLE WHERE ID NOT IN(SELECT TOP 10*10 * from TABLE)²éѯ¾¹È»ÒªºÃ¼¸·ÖÖÓ£¬º¹~~~~£¡
   ÍøÉϲ鵽µÄÒ»ÌõÓï¾ä»¹²»´í¡£
    SELECT TOP 10 id,Message,CreateTime ......

ΪaccessÊý¾Ý¿â´´½¨ÓµÓв»Í¬·ÃÎÊȨÏÞµÄÓû§

      JavaÅàѵ¿Î³ÌÖ®Êý¾Ý¿â¼¼Êõѧϰ
      ¿´µ½ºÜ¶à³õѧÕß·´¸´ÎÊÕâ¸öÎÊÌ⣬дÁËÒ»¸öºÜ¼òµ¥µÄÒ»¸ö½Å±¾£¬ÓÃÓÚ×Ô¶¯ÉèÖû·¾³±äÁ¿¡£°Ñ´úÂ뿽±´£¬Áí´æÎªjavaEnv.bat¡£°²×°ÍêJava 2 SDKÖ®ºó£¬¿ªÒ»¸öÃüÁîÐд°¿Ú,ÊäÈëjavaEnv java2SDKDir(java2SDKDirÊÇÄãµÄjavaµÄ°²×°Ä¿Â¼£¬²»´ ......

ÓÃVFPÁгöACCESSËùÓбíµÄ×ֶνṹ£¬º¬±êÌâ¡£

     set safety off
     local oo,lcStr,lcMdbFile,i,x,lnFields,lcTableName,lnFieldtype,lcCurdir
     lcCurdir = sys(5) + curdir()
     lcNowdir = getdir()
     cd (lcNowdir)
   &nb ......

AccessÊý¾Ý²Ù×÷Update·½·¨

using System.Data.OleDb; //ÕâÀïÒªÒýÓÃOleDb¿Õ¼ä
public partial class addInfo : System.Web.UI.Page
{
    //Êý¾Ý¿âÁ¬½Ó×Ö·û´®
    static string strCon = @"provider = Microsoft.Jet.OLEDB.4.0;Data source = |DataDirectory|gyMDB.mdb";
    //ÒÔÉÏ·½·¨ÎªÁ¬½ÓACC ......

½â¾öSQL ServerתACCESS×Ô¶¯±àºÅÎÊÌâ


1.´ò¿ªSQL server enterprise mananger “ÆóÒµ¹ÜÀíÆ÷”
ÔÚÄãÒªµ¼³öµÄSQLÊý¾Ý¿âÉÏÊó±êÓÒ¼ü²Ëµ¥£ºËùÓÐÈÎÎñ-¡·µ¼³öÊý¾Ý
2.»Ø³öÏÖÒ»¸öµ¼³öÏòµ¼´°¿Ú¡£
Ñ¡Ôñ±»µ¼³öµÄÊý¾ÝÔ´£¬ÎªÄã¸Õ²ÅËùÑ¡ÔñµÄÊý¾Ý¿â£¬Èç¹û·¢ÏÖ²»¶ÔÓ¦×ÔÐÐÐ޸ġ£
3.½øÈëµ¼³öµ½Ä¿±êÊý¾ÝÔ´µÄÑ¡Ôñ£¬ÕâÀïÎÒÃÇҪת³ÉACCESSµÄÊý¾Ý¿â¡£×¢ÒâÑ¡ÔñÊý¾ÝÔ´ÀàÐÍÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ