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

VCÐÞ¸ÄAccessÃÜÂë

void ModifyDBCode()
{
 CString strPath;
 ::GetModuleFileName(GetModuleHandle(NULL),strPath.GetBuffer(256),256);
 strPath.ReleaseBuffer();
 int flag=strPath.ReverseFind('\\');
 int size=strPath.GetLength();
 strPath.Delete(flag,size-flag);
 strPath= strPath+ _T("\\test.mdb");     //Êý¾Ý¿âÃû³Æ
 CString strConn=_T("Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=");
 CString buf=strPath;
 ASSERT(buf != _T(""));
 strConn+=buf;
 strConn+=_T(";Jet OLEDB:Database Password = ");
 strConn+= g_strPassword;
 strConn+=_T(";Mode=Share Deny Read|Share Deny Write");      // du zhan fang shi da kai
 CADODatabase pAdoDb;
 pAdoDb.SetConnectionString(strConn);
 if(!pAdoDb.Open()) return;
 CString strExe = _T("ALTER DATABASE PASSWORD [");
 strExe += m_strNewCode;
 strExe += _T("] [");
 strExe += g_strPassword;
 strExe += _T("]");
 pAdoDb.Execute(strExe);
}


Ïà¹ØÎĵµ£º

JavaScript Access´úÂë²Î¿¼

///ÏÂÃæÊǶÔAccessµÄÁ´½Ó
function getCountfromDB() {
    //ÒÔµ±Ç°Ò³ÃæÎļþΪ»ù´¡£¬ÕÒµ½ÎļþËùÔڵľø¶Ô·¾¶¡£
    var filePath = location.href.substring(0, location.href.indexOf("Cnt.htm"));
    var path = filePath + "MyData.mdb";
    //È¥µ ......

AccessÓëSql ServerÖ®ASP´úÂë±È½Ï

ºǫ́Êý¾Ý¿â£º
[Microsoft Access]
Óë
[Microsoft Sql Server]
¸ü»»Ö®ºó£¬ASP´úÂëӦעÒâÒªÐ޸ĵÄһЩµØ·½£º
[Ò»]Á¬½ÓÎÊÌ⣨¾ÙÀý)
[Microsoft Access]
constr = "DBQ=c:\data\clwz.mdb; DRIVER={Microsoft Access Driver (*.mdb)}"
[Microsoft Sql Server]
constr = "DRIVER={SQL Server};SERVER=host;DATA ......

Access µÄ·ÖÒ³¹¦ÄÜ

if (currentPage ==1) {
//Èç¹ûµ±Ç°Ò³ÎªµÚ1Ò³
sql ="select top "+pageSize+" * from Table";
} else {
int start =(currentPage -1)*pageSize;
sql ="select top "+pageSize+" * from Table where ID not in (select top "+start+" ID from Table)";
} ......

¡¾×ª¡¿ACCESSÖÐÈçºÎÔÚSQLÓï¾äµÄWHEREÌõ¼þÖмÓÈÕÆÚÌõ¼þ

ת×Ô
http://topic.csdn.net/t/20050110/09/3711952.html
accessÖÐʱ¼äÒªÓÃ#,²»ÊÇË«ÒýºÅ  
  select   *   from   kc   where   rq   <   #2000-01-01#   and   rq>#2002-01-01#  
  ²»ÒªÓÃbetween,ËüµÄЧÂÊÌ©µÍ  
ʹÓÃ# ¶ø²»ÊÇ ......

VB´´½¨ACCESSÊý¾Ý¿âÈ«½â

VB´´½¨ACCESSÊý¾Ý¿âÈ«½â ¶¯Ì¬´´½¨Êý¾Ý¿â¡¢´´½¨±í£¬´´½¨¼Ç¼ ADO¡¢ADOX2009Äê04ÔÂ20ÈÕ ÐÇÆÚÒ» 10:17ÕªÒª£º ±¾ÎIJûÊöÁËÔÚVB³ÌÐòÖÐÀûÓÃADO¶ÔÏó¶¯Ì¬´´½¨Êý¾Ý¿âºÍÊý¾Ý±íµÄ·½·¨£¬ÕâЩ·½·¨ÔÚ¿ª·¢VBÊý¾Ý¿âÓ¦ÓóÌÐòÖкÜÓÐʵÓüÛÖµ£¬Ëü¿ÉÒÔÌá¸ßÊý¾Ý¿â³ÌÐòÁé»îÐÔ¡£
¡¡¡¡¹Ø¼ü´Ê£ºÊý¾Ý¿â¡¢Êý¾Ý±í¡¢ADO¡¢ADOX
¡¡¡¡1: ÎÊÌâµÄÌá³ö
¡¡¡¡Ô ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ