INFO: ?????? ??? CREATE_DB ? REPAIR_DB COMPACT_DB

?????? ????????? ?????? ?????????
???? ???????: 126606 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

???? ??? "?????????" ?? "????? ?????" ODBC ??????? 2.0 Desktop ?????? ?? ?????? ????? Microsoft Access ???? ??????? ???????? CREATE_DB REPAIR_DB ? COMPACT_DB ??? ??????? lpszAttributes ???? ???? ??? ?????? ??? ???? ?????? ?????? ???.

??????? ????

?? ???? ??????? ??????? ???????? lpszAttributes SQLConfigDataSource CREATE_DB REPAIR_DB ? COMPACT_DB ????????? ?? ??????? ???????? ??????. ??? ??? ???? ??????? ??? ????? ???? ?????? ????? ????? ??? ???? .MDB ?? ???? ???????? ???? ??? ?????? ???? ?? ????? ????? ?????. ??? ????? ???? ???????? ??? ??????? ???? ??? SQLConfigDataSource ??? ?????? ??? .MDB ???? ??? ??????? SQLConfigDataSource ??????.

??? ???? ?????? ?? ??? ??? ??????? ????????:
   CREATE_DB=<path name> <sort order>
   REPAIR_DB=<path name>
   COMPACT_DB=<source path> <destination path> <sort order>
				
< ???? ??? > ?? ??? ???? ???? ???? ???? ??? ????? .MDB ????? ?? ??????. <???? ?????? > ?? ??? ???? ???? ???? ???? ??? ????? .MDB ?? ??? ???. <???? ?????? > ?? ??? ???? ???? ???? ???? ????? ??? ??? ?? ???. <????? ????? > ???? ??????? ???????? ???????:
????????? ??? ? ?????????, ????????? ? ?????/?????? ? ?????????/??????????? ? ?????????? ? ???????? ? ???????? ? ????????? ? ??????? ? ??????? ? ???????, ???????, ?????????
??????: ????? ??? "???" ???? ?????????? ? ???????? ????????? ?????????? ? ?????????.

???????? ??? ??????? ?? Microsoft Jet Engine ????????? ?? ??? ?????? ????? ODBC Access Microsoft ????? ?? ???? ?????? ??????? ???????? ???????:
CREATE_DBV2=<path name> <sort order> (to create version 2 Jet engine mdb file, Access 2, 16bit)


CREATE_DBV3=<path name> <sort order> (to create version 3 Jet engine mdb file, Access 95, Access 97)


CREATE_DBV4=<path name> <sort order> (to create version 4 Jet engine mdb file, Access 2000)
					
?????? ??? ??????? ?????? ??? ??? ???????? ?????? ???? MSDN ??? ?? ???? Microsoft Press ???? Microsoft Jet ????? ???? ????????? ?????.

??????: ??? ??????? ??????? ???? ??? ???? ???????? CREATE_DBV2 ????? ?????? ??????? CREATE_DBV3 CREATE_DBV4.

?? CREATE_DB ? ??? ?? ??? ????? ????? ?????? ?? < ??? ???? > ?? ??? ???? SQLCOnfigDataSource.

?? REPAIR_DB ? ??? ?? ???? ????? ?????? ?? < ??? ?????? > ??? .MDB ????.

?? COMPACT_DB ? ??? ?? ???? ????? ?????? ?? < ???? ?????? > ??? .MDB ????. ???? ??????? < ???? ?????? > ??? ??? ????? ?? < ???? ?????? > ? ??? ???? ????? ??? ??? ??? ??? ??? ??????. ??? ??? < ???? ?????? > ????? ??? ??? ?? < ???? ?????? > ????? ?????? ??? ??? ?? < ???? ?????? > ??? ????? ?? ????? SQLConfigDataSource ????.

??? ???? ??????? ???? ????????? ???????? ??????? ????? ??? .MDB ? ??????, ??? ????? ???? ? ??? ?? ??? ?????? ?? ?? ?????? ???? ?????? ??.
   void Config_Sample(void)
   {
             RETCODE retcode;
             int     subscrp;
     extern  HWND    hWnd;      /* Main window handle. */ 

     UCHAR szDriver[] = "Microsoft Access Driver (*.mdb)";
     UCHAR *szAttributes2[] =
     // Create the original .mdb file.
     {"CREATE_DB=c:\\odbcsdk\\smpldata\\access\\general.mdb General\0\0",

     // Issue a REPAIR_DB on the created file.
     "REPAIR_DB=c:\\odbcsdk\\smpldata\\access\\general.mdb\0\0",

     // Compact the file into a new location.
     "COMPACT_DB=c:\\odbcsdk\\smpldata\\access\\general.mdb "
       "c:\\odbcsdk\\smpldata\\access\\general2.mdb General\0\0",

     // Compact the file onto itself.
     "COMPACT_DB=c:\\odbcsdk\\smpldata\\access\\general.mdb "
       "c:\\odbcsdk\\smpldata\\access\\general.mdb General\0\0",

     // Create a datasource for the first .mdb file created.
     "DSN=albacc\0FIL=MS Access\0JetIniPath=odbcddp.ini\0"
     "DBQ=c:\\odbcsdk\\smpldata\\access\\general.mdb\0"
     "DefaultDir=c:\\odbcsdk\\smpldata\\access\0\0"};

     for (subscrp = 0;
          subscrp <= ((sizeof szAttributes2 / sizeof(UCHAR *)) - 1);
           subscrp++)
     {
       retcode = SQLConfigDataSource(hWnd,
                                     ODBC_ADD_DSN,
                                     szDriver,
                                     szAttributes2[subscrp]);
       if (retcode != TRUE)
         handle_error(retcode);
     }
     return;
   }
				

???????

???? ???????: 126606 - ????? ??? ??????: 20/???? ?????/1422 - ??????: 1.0
????? ???
  • Microsoft Open Database Connectivity 2.0
  • Microsoft Open Database Connectivity 3.0
  • Microsoft Open Database Connectivity 3.5
????? ??????: 
kbmt kbcode kbinfo kbprogramming kbusage KB126606 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????126606
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com