Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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

accessÊý¾Ý¿â²åÈë¸üгö´í

½ñÌì̸Á½¸öASPÔËÐÐʱ¿ÉÄܳöÏÖµÄÓëIISÓйصĴíÎó
-------------------------------------------------------------------
´íÎóÀàÐÍÒ»£º
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] ²»ÄܸüС£Êý¾Ý¿â»ò¶ÔÏóΪֻ¶Á¡£
´íÎóÀàÐͶþ£º
Microsoft OLE DB Provider for ODBC Drivers ´íÎó ''80004005''
[Microsoft][ODBC Microsoft Access Driver]³£¼û´íÎó ²»ÄÜ´ò¿ª×¢²á±í¹Ø¼ü×Ö ''Temporary (volatile) Jet DSN for process 0x728 Thread 0x854 DBC 0x276fb44 Jet''¡£
-------------------------------------------------------------------
        µ±ÄãʹÓÃASPÁ¬½ÓÊý¾Ý¿âʱ¿ÉÄÜ»á³öÏÖÕâÖÖÇé¿ö£¬ÎªÊ²Ã´ÄØ£¿ÒòΪÄúÊý¾Ý¿âÎļþËùÔÚµÄĿ¼ȨÏÞ¶ÔÌض¨µÄÓû§Ã»ÓпªÆô×ã¹»µÄȨÏÞ£¬ÄãÖ»ÄܽøÐÐÖ»¶Á·ÃÎÊ£¬Ò»°ã³öÏÖÕâÖÖÇé¿öµÄÎļþϵͳΪNTFS£¬ÄÇÔõô½â¾öÄØ£¿
        Ê×ÏÈ£¬ÄãÕÒµ½Êý¾Ý¿âËùÔÚĿ¼£¬Ò²¿ÉÒÔÊÇÉϲãĿ¼£¬È»ºóÉèÖÃÎļþ¼Ð °²È« ÊôÐÔ£¬×î¼òµ¥µÄÊÇ°ÑeveryoneµÄȨÏÞÉèÖóÉÍêÈ«¼´¿É£¬ÄǶÔÓÚÕâ¸öÎÊÌ⣬Ӧ¸ÃʹÄĸö¶ÔÏóµÄȨÏÞÉèÖóÉÍêÈ«ÄØ£¿´ð° ......

SQL Access´´½¨±í

Ò»¡¢´´½¨Ò»ÕÅ¿Õ±í£º
Sql="Create TABLE [±íÃû]"
¶þ¡¢´´½¨Ò»ÕÅÓÐ×Ö¶ÎµÄ±í£º
Sql="Create TABLE [±íÃû]([×Ö¶ÎÃû1] MEMO NOT NULL, [×Ö¶ÎÃû2] MEMO, [×Ö¶ÎÃû3] COUNTER NOT NULL, [×Ö¶ÎÃû4] DATETIME, [×Ö¶ÎÃû5] TEXT(200), [×Ö¶ÎÃû6] TEXT(200))
×Ö¶ÎÀàÐÍ£º
2 : "SmallInt", // ÕûÐÍ
3 : "Int", // ³¤ÕûÐÍ
4 : "Real", // µ¥¾«¶ÈÐÍ
5 : "Float", // Ë«¾«¶ÈÐÍ
6 : "Money", // »õ±Ò
7 : "DateTime", // ÈÕÆÚʱ¼ä
11 : "Bit", // ÊÇ·ñ
13 : "TimeStamp",
17 : "TinyInt", // ×Ö½Ú
72 : "UniqueIdentifier", // ͬ²½¸´ÖÆ ID
128 : "Binary",
129 : "Char",
130 : "NChar",
131 : "Decimal", // СÊý
133 : "DateTime",
135 : "SmallDateTime",
200 : "VarChar",
201 : "Text",
202 : "VarChar", // Îı¾
203 : "Text", // ±¸×¢
204 : "Binary", // ¶þ½øÖÆ
205 : "Image" // OLE ¶ÔÏó
ÒÔÏÂ×Ö¶ÎΪÎÞ±àÂë× ......

SQL Access´´½¨±í

Ò»¡¢´´½¨Ò»ÕÅ¿Õ±í£º
Sql="Create TABLE [±íÃû]"
¶þ¡¢´´½¨Ò»ÕÅÓÐ×Ö¶ÎµÄ±í£º
Sql="Create TABLE [±íÃû]([×Ö¶ÎÃû1] MEMO NOT NULL, [×Ö¶ÎÃû2] MEMO, [×Ö¶ÎÃû3] COUNTER NOT NULL, [×Ö¶ÎÃû4] DATETIME, [×Ö¶ÎÃû5] TEXT(200), [×Ö¶ÎÃû6] TEXT(200))
×Ö¶ÎÀàÐÍ£º
2 : "SmallInt", // ÕûÐÍ
3 : "Int", // ³¤ÕûÐÍ
4 : "Real", // µ¥¾«¶ÈÐÍ
5 : "Float", // Ë«¾«¶ÈÐÍ
6 : "Money", // »õ±Ò
7 : "DateTime", // ÈÕÆÚʱ¼ä
11 : "Bit", // ÊÇ·ñ
13 : "TimeStamp",
17 : "TinyInt", // ×Ö½Ú
72 : "UniqueIdentifier", // ͬ²½¸´ÖÆ ID
128 : "Binary",
129 : "Char",
130 : "NChar",
131 : "Decimal", // СÊý
133 : "DateTime",
135 : "SmallDateTime",
200 : "VarChar",
201 : "Text",
202 : "VarChar", // Îı¾
203 : "Text", // ±¸×¢
204 : "Binary", // ¶þ½øÖÆ
205 : "Image" // OLE ¶ÔÏó
ÒÔÏÂ×Ö¶ÎΪÎÞ±àÂë× ......

¹ØÓÚupdateÓï¾äÔÚsqlserverºÍAccessÖеĶԱÈ

sqlserver£ºupdate Table_A set Table_A.col1 = (select Table_B.col1 from Table_B where Table_A.col2 = Table_B.col2)
Access: UPDATE Table_ A, Table_B SET Table_ A.×Ö¶Î2 = Table_ B.×Ö¶Î2
WHERE Table_ A.񅧏=Table_ A.񅧏;
×Ô¼º¼ÇÏ£¬ÌáÐÑ×Ô¼º ......

¹ØÓÚupdateÓï¾äÔÚsqlserverºÍAccessÖеĶԱÈ

sqlserver£ºupdate Table_A set Table_A.col1 = (select Table_B.col1 from Table_B where Table_A.col2 = Table_B.col2)
Access: UPDATE Table_ A, Table_B SET Table_ A.×Ö¶Î2 = Table_ B.×Ö¶Î2
WHERE Table_ A.񅧏=Table_ A.񅧏;
×Ô¼º¼ÇÏ£¬ÌáÐÑ×Ô¼º ......

Access ´íÁË£¬»¹ÊÇÎÒɵÁË

×î½üϵͳÔËÐÐÖз¢ÏÖAccess 2003 °æ±¾ÖжԴý Null ºÍ ‘’ £¨¿Õ×Ö·û£©Ææ¹ÖÎÊÌ⣬ÖØÏÖ²½Ö裺
1¡¢´´½¨±ítabTest £»
2¡¢Ê¹ÓÃÉè¼ÆÊÓͼÌí¼ÓÁ½¸ö×ֶΠID £¬col1
Ãû³Æ
ÀàÐÍ
³¤¶È
˵Ã÷
ID
Number
 
 
Ö÷¼ü£¬×ÔÔö
Col1
char
1
ÎÞ
 
3¡¢Ê¹ÓÃsql Ìí¼ÓÈçÏÂÊý¾Ý
-- col1 ×Ö¶ÎÉèÖÃΪ null
INSERT INTO tabtest (id, col1) VALUES(1, NULL);
-- col1 ×Ö¶ÎÉèÖÃΪ ‘’
INSERT INTO tabtest (id, col1) VALUES(2, '');
-- col1 ×Ö¶ÎÉèÖÃΪ ‘a’
INSERT INTO tabtest (id, col1) VALUES(3, 'a');
 
4¡¢ÖØн¨Á¢²éѯÇëÇó£¬Í¨¹ý sql Ìí¼ÓÐÂ×ֶΠcol2
-- Ìí¼ÓÐÂÁÐcol2
ALTER TABLE tabTest ADD COLUMN col2 CHAR(1);
 
5¡¢Ê¹ÓÃÈçÏÂsql ÔÙ´ÎÏò tabTest Ìí¼ÓÐÂÊý¾Ý
-- col1£¬col2 ×Ö¶ÎÉèÖÃΪ null
INSERT INTO tabtest(id, col1, col2) VALUES(4, NULL, NULL);
-- col1£¬col2 ×Ö¶ÎÉèÖÃΪ ‘’
INSERT INTO tabtest(id, col1, col2) VALUES(5, '', '');    
-- col1£¬col2 ×Ö¶ÎÉèÖÃΪ ‘a’
INSERT INTO tabtest(id, col1, col2) VALUES(6, 'a', 'a');&nb ......

»ñÈ¡AccessÓû§¶¨ÒåµÄ±íÃûºÍ¸÷±íµÄ×Ö¶ÎÃû

 public   static  DataTable GetSchemaTable(string connectionString)  //»ñÈ¡AccessËùÓеıíÃû£»
        {
            using (OleDbConnection connection = new
                       OleDbConnection(connectionString))
            {
                connection.Open();
                DataTable schemaTable = connection.GetOleDbSchemaTable(
                    OleDbSchemaGuid.Tables,
              &nbs ......

C#²Ù×÷ACCESSÊý¾Ý¿â(´´½¨,ѹËõ,±¸·Ý,»Ö¸´)(תÔØ)

ÏÂÃæÕâ¶ÎC# ´úÂë¿ÉÒÔÓÃÀ´Ñ¹ËõºÍÐÞ¸´AccessÊý¾Ý¿â,²»¹ÜËüÊÇÒ»¸ö¼òµ¥µÄ".mdb"ACCESSÊý¾Ý¿â»¹ÊÇÒ»¸ö".mdw"ÍøÂç¹²ÏíÊý¾Ý¿â,Õâ¸ö¹ý³ÌºÍÄãÔÚÓÃMS AccessÓ¦ÓóÌÐòÖÐʹÓõÄ"¹¤¾ß-Êý¾Ý¿âʵÓù¤¾ß-ѹËõºÍÐÞ¸´"ʱִÐеIJÙ×÷ÍêÈ«Ò»Ñù.ʵÀý´úÂëʹÓÃÁË"³Ù°ó¶¨"(ÔËÐÐÖÐÔÚÄÚ´æÖн¨Á¢COM¶ÔÏó),ÕâÑù¾Í²»ÐèÒªÔÚ¹¤³ÌÖмÓÈëCOMÒýÓÃÁË,Ò²²»ÐèÒªÔÚPCÉÏ°²×°MS AccessÓ¦ÓóÌÐò.Ö»ÐèÒªÒ»¸öJetÒýÇæ(JetÒýÇæ°üº¬ÔÚMDAC°²×°°üÖÐ,ÔÚWindows NT4ÒÔºóµÄ°æ±¾ÖÐ,ϵͳÒѾ­×Ô´øÁËÕâ¸öÒýÇæ).
C#²Ù×÷ACCESSÊý¾Ý¿âµÄ±³¾°
²»ÖªÄãÊÇ·ñÒ²Ñá·³ÁËÔÚ¹¤³ÌÖмÓÈ븴ÔÓµÄCOM¿âÒýÓÃ,µ«ÎÒÏàÐÅÕâ¸ö´¿.NET´úÂ뽫ʡȥ¶îÍâµÄ½»»¥²Ù×÷, RCWsºÍCOMÒýÓÃ.»ù±¾ÉÏ,ÓÉÓÚϵͳÖа²×°µÄMicrosoftÀà¿âµÄ²»Í¬(ÀýÈç:MS Office Object Library 9,10,11µÈµÈ),ÎÒÃÇÒ²²»ÖªµÀÓû§PCÖа²×°µÄOffice°æ±¾,ËùÒÔÎÒÃÇҪͨ¹ýProgIDÀ´·ÃÎÊCOM¶ÔÏó,¶ø²»ÄÜÓÃCLSID.ÀýÈç,µ±µ÷ÓÃ"Excel.Application",ʱ,µÃµ½µÄÊÇExcel,¶ø²»¹ÜϵͳÖа²×°MS OfficeµÄ°æ±¾,µ±ÔÚ´úÂëÖмÓÈë"MS Excel 10 Object library"ÒýÓÃʱ,ÆäʵֻÊǸøÓ¦ÓóÌÐò¼ÓÈëÁËÒ»¸ö·Ç³£ÊÜÏÞÖƵŦÄÜ.ËùÒÔÎÒÃÇʹÓÃSystem.ReflectionºÍ³Ù°ó¶¨.
1. ʵÀý´úÂë
Ö»Ðèµ÷ÓÃCompactAccessDBº¯Êý¼´¿ÉѹËõºÍÐÞ¸´Ä¿±êÊý¾Ý¿â ......

C#²Ù×÷ACCESSÊý¾Ý¿â(´´½¨,ѹËõ,±¸·Ý,»Ö¸´)(תÔØ)

ÏÂÃæÕâ¶ÎC# ´úÂë¿ÉÒÔÓÃÀ´Ñ¹ËõºÍÐÞ¸´AccessÊý¾Ý¿â,²»¹ÜËüÊÇÒ»¸ö¼òµ¥µÄ".mdb"ACCESSÊý¾Ý¿â»¹ÊÇÒ»¸ö".mdw"ÍøÂç¹²ÏíÊý¾Ý¿â,Õâ¸ö¹ý³ÌºÍÄãÔÚÓÃMS AccessÓ¦ÓóÌÐòÖÐʹÓõÄ"¹¤¾ß-Êý¾Ý¿âʵÓù¤¾ß-ѹËõºÍÐÞ¸´"ʱִÐеIJÙ×÷ÍêÈ«Ò»Ñù.ʵÀý´úÂëʹÓÃÁË"³Ù°ó¶¨"(ÔËÐÐÖÐÔÚÄÚ´æÖн¨Á¢COM¶ÔÏó),ÕâÑù¾Í²»ÐèÒªÔÚ¹¤³ÌÖмÓÈëCOMÒýÓÃÁË,Ò²²»ÐèÒªÔÚPCÉÏ°²×°MS AccessÓ¦ÓóÌÐò.Ö»ÐèÒªÒ»¸öJetÒýÇæ(JetÒýÇæ°üº¬ÔÚMDAC°²×°°üÖÐ,ÔÚWindows NT4ÒÔºóµÄ°æ±¾ÖÐ,ϵͳÒѾ­×Ô´øÁËÕâ¸öÒýÇæ).
C#²Ù×÷ACCESSÊý¾Ý¿âµÄ±³¾°
²»ÖªÄãÊÇ·ñÒ²Ñá·³ÁËÔÚ¹¤³ÌÖмÓÈ븴ÔÓµÄCOM¿âÒýÓÃ,µ«ÎÒÏàÐÅÕâ¸ö´¿.NET´úÂ뽫ʡȥ¶îÍâµÄ½»»¥²Ù×÷, RCWsºÍCOMÒýÓÃ.»ù±¾ÉÏ,ÓÉÓÚϵͳÖа²×°µÄMicrosoftÀà¿âµÄ²»Í¬(ÀýÈç:MS Office Object Library 9,10,11µÈµÈ),ÎÒÃÇÒ²²»ÖªµÀÓû§PCÖа²×°µÄOffice°æ±¾,ËùÒÔÎÒÃÇҪͨ¹ýProgIDÀ´·ÃÎÊCOM¶ÔÏó,¶ø²»ÄÜÓÃCLSID.ÀýÈç,µ±µ÷ÓÃ"Excel.Application",ʱ,µÃµ½µÄÊÇExcel,¶ø²»¹ÜϵͳÖа²×°MS OfficeµÄ°æ±¾,µ±ÔÚ´úÂëÖмÓÈë"MS Excel 10 Object library"ÒýÓÃʱ,ÆäʵֻÊǸøÓ¦ÓóÌÐò¼ÓÈëÁËÒ»¸ö·Ç³£ÊÜÏÞÖƵŦÄÜ.ËùÒÔÎÒÃÇʹÓÃSystem.ReflectionºÍ³Ù°ó¶¨.
1. ʵÀý´úÂë
Ö»Ðèµ÷ÓÃCompactAccessDBº¯Êý¼´¿ÉѹËõºÍÐÞ¸´Ä¿±êÊý¾Ý¿â ......
×ܼǼÊý:314; ×ÜÒ³Êý:53; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [1] [2] [3] 4 [5] [6] [7] [8] [9] [10]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ