Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : access

¼òÒ×È´²»Ê§»ªÀö [½øÏú´æ¹ÜÀí£Ý(BCB+ACCESS)

ϵͳ»·¾³£ºwindows xp
Èí¼þ»·¾³£ºC£«£« builder 6.0
±¾´ÎÄ¿µÄ£ºÍê³ÉÒ»¸ö¼òÒ×È´²»Ê§»ªÀöµÄ½øÏú´æ¹ÜÀíϵͳ¡£
        ÕâÊÇ°ëÄêÇ°×÷µÄÒ»¸ö¿Î³ÌÉè¼Æ£¬ÓõÄBCB+ACCESSÊý¾Ý¿âÍê³ÉµÄ£¬½çÃæÃÀ»¯ÊÇÓõÄBusinessSkinForm5.25ºº»¯°æ£¬ËüÊÇBCBµÄµÚÈý·½¿Ø¼þ£¬Ê¹ÓñȽϷ½±ã£¬ÍøÉÏÓкܶàÌ×Ƥ·ô¿É¹©ÏÂÔØ¡£¾ßÌå³ÌÐòËùʵÏֵĴúÂë±È½Ï¼òµ¥£¬ÕâÀï¾Í²»½²ÊöÁË¡£ÒÔÏÂËùÈí¼þµÄ´ó¸ÅÔËÐÐЧ¹û¡£
(×¢£º»ÆÉ«¿ò
ÀïÊÇÌáʾÄÚÈÝ£¬ÂÌÉ«¼ýÍ·
¿ÉÒÔµã»÷½øÈëÏÂÒ»»­Ãæ¡£)
´Ë³ÌÐòÒѾ­¾­¹ýÍêÈ«±àÒ룬¿ÉÒÔÖ±½ÓÔËÐС£ÏÖ¸½ÉÏÏÂÔصØÖ·£ºÏÂÔصØÖ·Ò»
......

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

     set safety off
     local oo,lcStr,lcMdbFile,i,x,lnFields,lcTableName,lnFieldtype,lcCurdir
     lcCurdir = sys(5) + curdir()
     lcNowdir = getdir()
     cd (lcNowdir)
     oo = NEWOBJECT('Access.Application')
     oo.AutomationSecurity = 1
     oo.UserControl           = .F.
     lcMdbFile = getFile('mdb')
     if not empty(lcMDBFile)
        oo.OpenCurrentDatabase(lcMDBFile)
         lnTables = oo.CurrentDb.TableDefs.Count
         for i = 5 to lnTables - 1
              lcStr = ''
             ......

½«accessµ¼ÈëSQL server

Ò»¡¢SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡¡ð1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡¡ð2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºóÑ¡Ôñ  czdImport Data£¨µ¼ÈëÊý¾Ý£©¡£
¡¡¡¡¡ð3ÔÚChoose a Data Source£¨Ñ¡ÔñÊý¾ÝÔ´£©¶Ô»°¿òÖÐÑ¡ÔñMicrosoft Access as the Source£¬È»ºó¼üÈëÄãµÄ.mdbÊý¾Ý¿â(.mdbÎļþÀ©Õ¹Ãû)µÄÎļþÃû»òͨ¹ýä¯ÀÀÑ°ÕÒ¸ÃÎļþ¡£
¡¡¡¡¡ð4ÔÚChoose a Destination£¨Ñ¡ÔñÄ¿±ê£©¶Ô»°¿òÖУ¬Ñ¡ÔñMicrosoft OLE¡¡DB Prov ider for SQL¡¡Server£¬Ñ¡ÔñÊý¾Ý¿â·þÎñÆ÷£¬È»ºóµ¥»÷±ØÒªµÄÑéÖ¤·½Ê½¡£
¡¡¡¡¡ð5ÔÚSpecify Table Copy£¨Ö¸¶¨±í¸ñ¸´ÖÆ£©»òQuery£¨²éѯ£©¶Ô»°¿òÖУ¬µ¥»÷Copy tables£¨¸´ÖƱí¸ñ£©¡£
    ¡ð6ÔÚSelect Source Tables£¨Ñ¡ÔñÔ´±í¸ñ£©¶Ô»°¿òÖУ¬µ¥»÷Select All£¨È«²¿Ñ¡¶¨£©¡£ÏÂÒ»²½£¬Íê³É¡£
Transact-SQLÓï¾ä½øÐе¼Èëµ¼³ö£º
1.ÔÚSQL SERVERÀï²éѯaccessÊý¾ ......

½«accessµ¼ÈëSQL server

Ò»¡¢SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡¡ð1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡¡ð2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºóÑ¡Ôñ  czdImport Data£¨µ¼ÈëÊý¾Ý£©¡£
¡¡¡¡¡ð3ÔÚChoose a Data Source£¨Ñ¡ÔñÊý¾ÝÔ´£©¶Ô»°¿òÖÐÑ¡ÔñMicrosoft Access as the Source£¬È»ºó¼üÈëÄãµÄ.mdbÊý¾Ý¿â(.mdbÎļþÀ©Õ¹Ãû)µÄÎļþÃû»òͨ¹ýä¯ÀÀÑ°ÕÒ¸ÃÎļþ¡£
¡¡¡¡¡ð4ÔÚChoose a Destination£¨Ñ¡ÔñÄ¿±ê£©¶Ô»°¿òÖУ¬Ñ¡ÔñMicrosoft OLE¡¡DB Prov ider for SQL¡¡Server£¬Ñ¡ÔñÊý¾Ý¿â·þÎñÆ÷£¬È»ºóµ¥»÷±ØÒªµÄÑéÖ¤·½Ê½¡£
¡¡¡¡¡ð5ÔÚSpecify Table Copy£¨Ö¸¶¨±í¸ñ¸´ÖÆ£©»òQuery£¨²éѯ£©¶Ô»°¿òÖУ¬µ¥»÷Copy tables£¨¸´ÖƱí¸ñ£©¡£
    ¡ð6ÔÚSelect Source Tables£¨Ñ¡ÔñÔ´±í¸ñ£©¶Ô»°¿òÖУ¬µ¥»÷Select All£¨È«²¿Ñ¡¶¨£©¡£ÏÂÒ»²½£¬Íê³É¡£
Transact-SQLÓï¾ä½øÐе¼Èëµ¼³ö£º
1.ÔÚSQL SERVERÀï²éѯaccessÊý¾ ......

Ô¶³ÌÁ¬½ÓaccessÊý¾Ý¿âµÄ¼¸¸ö·½·¨£º

ʹÓÃÁËTCP/IP£¬ADO¼°XML£¨ÐèÒª°²×°Microsoft XML 4.0¡££©¡£·Ö·þÎñÆ÷ºÍ¿Í»§¶ËÁ½²¿·Ö£¬·þÎñÆ÷¿ÉÒÔ¶àÓû§Í¬Ê±Á¬½Ó¡£Ô¶³ÌÁ¬½ÓAccessÊý¾Ý¿âÓкܶ෽·¨£¬ÎÒÒÔÇ°ÒѾ­±È½Ï¾ßÌåµÄ»Ø´ð¹ý£¨¼ûÏÂÃæËùÁеÄ5ÖÖ·½·¨£©£¬ÎÒÏÖÔÚÕâ¸öÀý×ÓÊôÓÚÆäÖеĵڣ³ÖÖ·½·¨£¨²»ÐèҪʹÓÃRDS»òWeb·þÎñÆ÷£©¡£
Ô¶³ÌÁ¬½ÓaccessÊý¾Ý¿âµÄ¼¸¸ö·½·¨£º
£±£®½¨Á¢VPN£¬ÕâÑùÄãµÄµçÄÔºÍÖ÷»úµÄÁ¬½Ó¾ÍÓë¾ÖÓòÍøÎÞÒ죬Ȼºó°Ñ·þÎñÆ÷ÖÐmdbÎļþËùÔÚµÄFolder¹²Ïí¼´¿É¡£ADOÁ¬½ÓÈçÏ£ºoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=““ServerName“DatabaseFolder“Database.mdb;Jet OLEDB:Database Password=databasepw;Persist Security Info=False"
£²£®°ÑDatabase·ÅÔÚWeb ServerÉÏ£¬Ê¹ADO»òRDOͨ¹ýRDS£¨Remote Data Service£©¼°IISÀ´ÊµÏÖ£º
¼ÙÈç·þÎñÆ÷ÏñÉÏÃæJave´óÏÀ˵ÄÇÑùÉèÖÃÁËODBC DSNµÄ»°£º
oConn.Open "Provider=MS Remote;" _
"Remote Server=http://myServerName;" _
"Remote Provider=MSDASQL;" _
"DSN=AdvWorks;" _
"Uid=myUsername;" _
"Pwd=myPassword"
¼ÙÈçÉèÖõÄÊÇOLE DB Provider µÄ»°£º
oConn.Open "Provider=MS Remote;" _
"Remote Server=http://myServerName;" ......

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

ÊìϤSQL SERVER 2000µÄÊý¾Ý¿â¹ÜÀíÔ±¶¼ÖªµÀ£¬ÆäDTS¿ÉÒÔ½øÐÐÊý¾ÝµÄµ¼Èëµ¼³ö£¬Æäʵ£¬ÎÒÃÇÒ²¿ÉÒÔʹÓÃTransact-SQLÓï¾ä½øÐе¼Èëµ¼³ö²Ù×÷¡£ÔÚTransact-SQLÓï¾äÖУ¬ÎÒÃÇÖ÷ҪʹÓÃOpenDataSourceº¯Êý¡¢OPENROWSET º¯Êý£¬¹ØÓÚº¯ÊýµÄÏêϸ˵Ã÷£¬Çë²Î¿¼SQLÁª»ú°ïÖú¡£ÀûÓÃÏÂÊö·½·¨£¬¿ÉÒÔÊ®·ÖÈÝÒ×µØʵÏÖSQL SERVER¡¢ACCESS¡¢EXCELÊý¾Ýת»»£¬Ïêϸ˵Ã÷ÈçÏ£º
Ò»¡¢SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡¡ð1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡¡ð2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºóÑ¡Ôñ  czdImport Data£¨µ¼ÈëÊý¾Ý£©¡£
¡¡¡¡¡ð3ÔÚChoose a Data Source£¨Ñ¡ÔñÊý¾ÝÔ´£©¶Ô»°¿òÖÐÑ¡ÔñMicrosoft Access as the Source£¬È»ºó¼üÈëÄãµÄ.mdbÊý¾Ý¿â(.mdbÎļþÀ©Õ¹Ãû)µÄÎļþÃû»òͨ¹ýä¯ÀÀÑ°ÕÒ¸ÃÎļþ¡£
¡¡¡¡¡ð4ÔÚChoose a Destination£¨Ñ¡ÔñÄ¿±ê£©¶Ô»°¿òÖУ¬Ñ¡ÔñMicrosoft OLE¡¡DB Prov ider for SQL¡¡Server£¬Ñ¡ÔñÊý¾Ý¿â·þÎñÆ÷£¬È»ºóµ¥»÷±ØÒªµÄÑéÖ¤·½Ê½¡£
¡¡¡¡¡ð5ÔÚSpecify Table Copy£¨Ö¸¶¨±í¸ñ¸´ÖÆ£©»òQuery£¨²éѯ£©¶Ô»°¿òÖУ¬µ¥»÷Copy tables£¨¸´ÖƱí¸ñ£© ......

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

ÊìϤSQL SERVER 2000µÄÊý¾Ý¿â¹ÜÀíÔ±¶¼ÖªµÀ£¬ÆäDTS¿ÉÒÔ½øÐÐÊý¾ÝµÄµ¼Èëµ¼³ö£¬Æäʵ£¬ÎÒÃÇÒ²¿ÉÒÔʹÓÃTransact-SQLÓï¾ä½øÐе¼Èëµ¼³ö²Ù×÷¡£ÔÚTransact-SQLÓï¾äÖУ¬ÎÒÃÇÖ÷ҪʹÓÃOpenDataSourceº¯Êý¡¢OPENROWSET º¯Êý£¬¹ØÓÚº¯ÊýµÄÏêϸ˵Ã÷£¬Çë²Î¿¼SQLÁª»ú°ïÖú¡£ÀûÓÃÏÂÊö·½·¨£¬¿ÉÒÔÊ®·ÖÈÝÒ×µØʵÏÖSQL SERVER¡¢ACCESS¡¢EXCELÊý¾Ýת»»£¬Ïêϸ˵Ã÷ÈçÏ£º
Ò»¡¢SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡¡ð1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡¡ð2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºóÑ¡Ôñ  czdImport Data£¨µ¼ÈëÊý¾Ý£©¡£
¡¡¡¡¡ð3ÔÚChoose a Data Source£¨Ñ¡ÔñÊý¾ÝÔ´£©¶Ô»°¿òÖÐÑ¡ÔñMicrosoft Access as the Source£¬È»ºó¼üÈëÄãµÄ.mdbÊý¾Ý¿â(.mdbÎļþÀ©Õ¹Ãû)µÄÎļþÃû»òͨ¹ýä¯ÀÀÑ°ÕÒ¸ÃÎļþ¡£
¡¡¡¡¡ð4ÔÚChoose a Destination£¨Ñ¡ÔñÄ¿±ê£©¶Ô»°¿òÖУ¬Ñ¡ÔñMicrosoft OLE¡¡DB Prov ider for SQL¡¡Server£¬Ñ¡ÔñÊý¾Ý¿â·þÎñÆ÷£¬È»ºóµ¥»÷±ØÒªµÄÑéÖ¤·½Ê½¡£
¡¡¡¡¡ð5ÔÚSpecify Table Copy£¨Ö¸¶¨±í¸ñ¸´ÖÆ£©»òQuery£¨²éѯ£©¶Ô»°¿òÖУ¬µ¥»÷Copy tables£¨¸´ÖƱí¸ñ£© ......

AccessºÍSQL2000ÖÐÓï¾äµÄÇø±ð

1 £¬¶ÔÓÚÈÕÆÚ×Ö¶Î×Ö¶Î
access±íʾΪ£º#1981-28-12#
SQLSERVER2000±íʾΪ£º''1981-02-12''
2,SQLÓï¾äÇø±ð£¬select ,update ÔÚ¶Ôµ¥±í²Ù×÷ʱ¶¼²î²»¶à£¬
µ«¶à±í²Ù×÷ʱupdateÓï¾äµÄÇø±ðACCESSÓëSQLSERVERÖеÄUpdateÓï¾ä¶Ô±È:
SQLSERVERÖиüжà±íµÄUpdateÓï¾ä:
Update Tab1
SET a.Name = b.Name
from Tab1 a,Tab2 b
Where a.ID = b.ID;
ͬÑù¹¦ÄܵÄSQLÓï¾äÔÚACCESSÖÐÓ¦¸ÃÊÇ
Update Tab1 a,Tab2 b
SET a.Name = b.Name
Where a.ID = b.ID;
¼´:ACCESSÖеÄUpdateÓï¾äûÓÐfrom×Ó¾ä,ËùÓÐÒýÓÃµÄ±í¶¼ÁÐÔÚUpdate¹Ø¼ü×Öºó.
¸üе¥±íʱ£º¶¼Îª£º
Update table1 set ab='12',cd=444 where ....
3,deleteÓï¾ä
accessÖÐɾ³ýʱÓÃ:delete * from table1 where a>2 ¼´Ö»Òª°Ñselect Óï¾äÀïµÄselect »»³Édelete¾Í¿ÉÒÔÁË¡£
sqlserve ÖÐÔòΪ: delete from table1 where a>2 ¼´Ã»ÓÐ*ºÅ
4£¬as ºóÃæµÄ¼ÆËã×Ö¶ÎÇø±ð
accessÖпÉÒÔÕâÑù£ºselect a,sum(num) as kc_num,kc_num*num as all_kc_num ¼´¿ÉÒÔ°ÑASºóµÄ×ֶε±×÷Ò»¸öÊý¾Ý¿â×ֶβÎÓë¼ÆËã¡£
sqlserver ÖÐÔòΪ£ºselect a,sum(num) as kc_num,sum(num)*num as all_kc_num ¼´²»¿ÉÒÔ°ÑASºóµÄ×ֶε±×÷Ò»¸öÊý¾Ý¿â×ֶβÎÓë¼ÆËã¡£
5£¬[ ......

AccessºÍSQL2000ÖÐÓï¾äµÄÇø±ð

1 £¬¶ÔÓÚÈÕÆÚ×Ö¶Î×Ö¶Î
access±íʾΪ£º#1981-28-12#
SQLSERVER2000±íʾΪ£º''1981-02-12''
2,SQLÓï¾äÇø±ð£¬select ,update ÔÚ¶Ôµ¥±í²Ù×÷ʱ¶¼²î²»¶à£¬
µ«¶à±í²Ù×÷ʱupdateÓï¾äµÄÇø±ðACCESSÓëSQLSERVERÖеÄUpdateÓï¾ä¶Ô±È:
SQLSERVERÖиüжà±íµÄUpdateÓï¾ä:
Update Tab1
SET a.Name = b.Name
from Tab1 a,Tab2 b
Where a.ID = b.ID;
ͬÑù¹¦ÄܵÄSQLÓï¾äÔÚACCESSÖÐÓ¦¸ÃÊÇ
Update Tab1 a,Tab2 b
SET a.Name = b.Name
Where a.ID = b.ID;
¼´:ACCESSÖеÄUpdateÓï¾äûÓÐfrom×Ó¾ä,ËùÓÐÒýÓÃµÄ±í¶¼ÁÐÔÚUpdate¹Ø¼ü×Öºó.
¸üе¥±íʱ£º¶¼Îª£º
Update table1 set ab='12',cd=444 where ....
3,deleteÓï¾ä
accessÖÐɾ³ýʱÓÃ:delete * from table1 where a>2 ¼´Ö»Òª°Ñselect Óï¾äÀïµÄselect »»³Édelete¾Í¿ÉÒÔÁË¡£
sqlserve ÖÐÔòΪ: delete from table1 where a>2 ¼´Ã»ÓÐ*ºÅ
4£¬as ºóÃæµÄ¼ÆËã×Ö¶ÎÇø±ð
accessÖпÉÒÔÕâÑù£ºselect a,sum(num) as kc_num,kc_num*num as all_kc_num ¼´¿ÉÒÔ°ÑASºóµÄ×ֶε±×÷Ò»¸öÊý¾Ý¿â×ֶβÎÓë¼ÆËã¡£
sqlserver ÖÐÔòΪ£ºselect a,sum(num) as kc_num,sum(num)*num as all_kc_num ¼´²»¿ÉÒÔ°ÑASºóµÄ×ֶε±×÷Ò»¸öÊý¾Ý¿â×ֶβÎÓë¼ÆËã¡£
5£¬[ ......
×ܼǼÊý:314; ×ÜÒ³Êý:53; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [44] [45] [46] [47] [48] [49] [50] 51 [52] [53]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ