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

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

VB´´½¨ACCESSÊý¾Ý¿âÈ«½â ¶¯Ì¬´´½¨Êý¾Ý¿â¡¢´´½¨±í£¬´´½¨¼Ç¼ ADO¡¢ADOX2009Äê04ÔÂ20ÈÕ ÐÇÆÚÒ» 10:17ÕªÒª£º ±¾ÎIJûÊöÁËÔÚVB³ÌÐòÖÐÀûÓÃADO¶ÔÏó¶¯Ì¬´´½¨Êý¾Ý¿âºÍÊý¾Ý±íµÄ·½·¨£¬ÕâЩ·½·¨ÔÚ¿ª·¢VBÊý¾Ý¿âÓ¦ÓóÌÐòÖкÜÓÐʵÓüÛÖµ£¬Ëü¿ÉÒÔÌá¸ßÊý¾Ý¿â³ÌÐòÁé»îÐÔ¡£
¡¡¡¡¹Ø¼ü´Ê£ºÊý¾Ý¿â¡¢Êý¾Ý±í¡¢ADO¡¢ADOX
¡¡¡¡1: ÎÊÌâµÄÌá³ö
¡¡¡¡ÔÚVisual BasicÖУ¬³£ÓõÄÊý¾Ý·ÃÎʽӿÚÓÐÏÂÁÐÈýÖÖ£ºÊý¾Ý¿â·ÃÎʶÔÏó(DAO£¬Data Access Object)¡¢Ô¶³ÌÊý¾Ý¿â¶ÔÏó(RDO£¬Remote Data Object)ºÍActiveXÊý¾Ý¶ÔÏó(ADO£¬ActiveX Data Object )¡£Êý¾Ý¿â·ÃÎʼ¼ÊõÒ»Ö±ÔÚ²»¶Ï½ø²½£¬¶øÕâÈýÖÖ½Ó¿ÚµÄÿһÖÖ¶¼·Ö±ð´ú±íÁ˸ü¼ÊõµÄ²»Í¬·¢Õ¹½×¶Î¡£×îеÄÊÇADO£¬ËüÊDZÈRDOºÍDAO¸ü¼Ó¼òµ¥£¬È»¶ø¸ü¼ÓÁé»îµÄ¶ÔÏóÄ£ÐÍ¡£ÕýÒòÈç´Ë£¬Ô½À´Ô½¶àµÄÈËÔÚÓÃVB¿ª·¢Êý¾Ý¿âÈí¼þʱʹÓÃADO×÷ΪÊý¾Ý·ÃÎʽӿڡ£ÔÚ¿ª·¢¹ý³ÌÖУ¬ÎÒÃÇͨ³£µÄʹÓõķ½·¨ÊÇ£ºÏÈʹÓÃÊý¾Ý¿â¹ÜÀíϵͳ(ÀýÈ磺Microsoft Access)»òVBÖеĿÉÊÓ»¯Êý¾Ý¹ÜÀíÆ÷½¨Á¢ºÃÊý¾Ý¿âºÍÊý¾Ý±í½á¹¹£¬È»ºóÔÚ³ÌÐòÖÐͨ¹ýʹÓÃADODCÊý¾Ý¿â¿Ø¼þ»òÒýÓÃADO¶ÔÏóÓëÊý¾Ý¿âÖÐµÄ±í½¨Á¢Á¬½Ó£¬ÔÙͨ¹ýÊý¾Ý¿â¸ÐÖª¿Ø¼þ(ÀýÈ磺Îı¾¿ò¡¢DataGridµÈ)À´½øÐÐÊý¾Ý¿âµÄ¸÷ÖÖ²Ù×÷¡£ÔÚÕâÖÖ¿ª·¢¹ý³ÌÖУ¬ÎÒÃÇÓÐʱÐèÒªÃæ¶ÔÕâÑùÒ»¸öÎÊÌ⣺ÈçºÎÈÃÓû§ÔÚ³ÌÐòÔËÐйý³ÌÖж¯Ì¬µØ½¨Á¢×Ô¼ºËùÐèµÄÊý¾Ý¿âºÍÊý¾Ý±íÒÔÌá¸ß³ÌÐòµÄÁé»îÐÔÄØ£¿ÔÚ³ÌÐòÔËÐйý³ÌÖн¨Á¢×Ô¼ºËùÐèµÄÊý¾Ý¿âºÍÊý¾Ý±í£¬Æä±¾ÖʾÍÊÇÓôúÂë(»òÕß˵ͨ¹ý±à³Ì)À´½¨Á¢Êý¾Ý¿âºÍÊý¾Ý±í¡£ÖÚËùÖÜÖª£¬ÔÚFoxpro»òASP±à³ÌÖУ¬ÕâÊǺÜÈÝÒ×µÄÒ»¼þʼþ¡£ÄÇôÔÚVBÊý¾Ý¿â±à³ÌÖÐÓÖÊÇÔõÑùÀ´²Ù×÷µÄÄØ£¿ÔÚVBÊý¾Ý¿â±à³ÌÖУ¬Èç¹ûʹÓÃDAO×÷ΪÊý¾Ý¿â·ÃÎʽӿڼ¼Êõ£¬Ôò¿ÉÒÔÓÃCreateDatabase½áºÏCreateTableDef·½·¨À´ÊµÏÖ£¬Ä¿Ç°ÒÑÓв»ÉÙÊéºÍÔÓÖ¾¶¼½²µ½ÁËÕâÖÖ·½·¨£¬±¾ÎľͲ»ÔÙ½²ÊöÁË£»µ«ÄãÈç¹ûʹÓõÄÊÇ×îеÄÊý¾Ý¿â·ÃÎʽӿڼ¼ÊõADO£¬ÄãÈ´·¢ÏÖÄ¿Ç°µÄÊéºÍÔÓÖ¾ÉÏûÓÐÎÄÕ½²µ½ÈçºÎÓôúÂëÀ´½¨Á¢Êý¾Ý¿âºÍÊý¾Ý±íµÄ·½·¨£¬¿ÉÓÐʱÎÒÃǷdz£ÐèÒªÓõ½ÕâÖÖ·½·¨£¬ÏÂÃæÎÒÃǾÍÀ´½â¾öÕâ¸öÎÊÌâ¡£
¡¡¡¡2: ADOÓëADOX
¡¡¡¡ÎÒÃÇÏÈÀ´¶ÔADO ºÍADOX½øÐмòµ¥µÄÈÏʶ¡£ÔÚVB6ÖУ¬Ê¹ÓÃADO¿ª·¢Êý¾Ý¿âÓ¦ÓóÌÐòʱ£¬ÎÒÃÇÒªÒýÓöÔÏó¿â"Microsoft ActiveX Data Objects 2.5 Library"£¬ Õâ¸ö¶«Î÷µÄ¼ò³Æ¾ÍÊÇADO£¬ËüÊÇVB6Êý¾Ý¿â×îºËÐĵĶÔÏóȺ£¬Ò²ÊÇVBÊý¾Ý¿â¿ª·¢ÈËÔ±¾­³£ËùÒýÓõĶÔÏó¿â£¬ÔÚVB6ÖÐÄã¿ÉÒÔ¿´µ½ËüµÄ¸÷ÖÖ°æ±¾£¬´Ó2.0°æµ½2.6°æ¶¼ÓУ¬ºÜ¶àÈ˶ÔËüÒѾ­ºÜÊìϤ£¬ÔÚ´ËÎÒÃDz»ÔÙÏêϸ½éÉÜ¡£Èç¹ûÒªÔÚ³ÌÐòÔËÐйý³ÌÖд´½¨Êý¾


Ïà¹ØÎĵµ£º

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)";
} ......

C#Á¬½ÓAccessºÍSQL ServerÊý¾Ý¿â

C#Á¬½ÓÁ¬½ÓAccess
Ê×ÏÈ¿´Ò»¸öÀý×Ó´úÂëƬ¶Ï:
³ÌÐò´úÂë:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwin ......

ÓÃTSQL°ÑAccessµÄ±íµ¼Èëµ½Ô¶³ÌSql Server

ÓÃTSQL°ÑAccessµÄ±íµ¼Èëµ½Ô¶³ÌSql Server£º
°Ñaccess µÄ.mdbÀït_itemList ±íµÄÊý¾Ý²åÈëµ½Ô¶³ÌSqlServerµÄt_itemL1111111±íÀï¡£
SELECT  top 10 *  INTO  t_itemL1111111 IN [ODBC] 
[ODBC;Driver=SQL Server; UID=jyb;PWD=jyb;Server=10.1.18.49;DataBase=ËùÓкϲ¢;]
    &nb ......

accessÖÐʱ¼äÒªÓÃ#,²»ÊÇË«ÒýºÅ

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

SQL SERVER ÓëACCESS¡¢EXCELµÄÊý¾Ýת»»

Ò»¡¢           SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ