????? ????? ??? .MDB ?????? ?????? Microsoft Access

?????? ????????? ?????? ?????????
???? ???????: 118609 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

??????: ?????? ??? ??????? ??? ????? ????? ????? .MDB ??????? ???????? Visual C++ ??????? 4.x ?? ????? ?????? ?????? ??????? ??????? ?? "????? ??????? ?? Microsoft:
126606INFO: ?????? ??? CREATE_DB ? REPAIR_DB COMPACT_DB
????? ??? .mdb ????? ?? ????? ???? ?????? Microsoft Access ???????? ????? ????? ????? ???????? ??????? (ODBC) ?? ?? ???? ????? ???? ???????? ???????. ?? ???? ????? ??? .mdb ???????? ???? MFC ????? ???????? "??" ????? ????? ????????? "ODBC" (API).

????? ??????? ???? ????? ??????? ?? ???? ???? ????? ????? ???? ?????? ??? ????????? ????? ??:

  • ??? ?????? ??? .mdb ?? ???????.
  • ???? ??? .mdb ???? ??????? ?? ??? ????????. ?? ?? ???? ??? .mdb ?? ??? ???????.
?????? ??? ??????? ??????? ??????? ??? ??? .mdb ??? ???? ???????? - ?????.

??????? ????

????? ??????? ???? ??????? ?? ??? ???????? ?????? ???????? ?????? ????? (& .EXE). ??? ?? ????? ??? .mdb ??? ??? ?????, ???? ????? ??? ??????? ?????? ?????? ?? ????? ??? ??? .mdb. ??????? ???????? ?????? ???? ??? ???:

  1. ????? ??? .mdb ??? ???????? Microsoft Access ?? MSQuery.
  2. ????? ??? .mdb ????? ??????? ?? ??? ???????? ?? ???? ????? ????? ?????? ??? ??? .RC:
          mdb_file  MDB_RESOURCE filename.mdb
    						
    ???:
          mdb_file      is  a name for identifying the resource.
          MDB_RESOURCE  is  a name for identifying the type of the resource
                            and can be any user-defined type.
          filename.mdb  is  the name of the .mdb file.
    						
  3. ????? ?????? ?? ???? ??? ??? .mdb. ????? ??????? ?????? ??????? ?? ?? ???? ?? ??????? ????? ?? ?????? ??? .mdb. (?? ???? ???? ??????? ?????? ??? .mdb ????? ???? CWinApp::InitInstance().)
       CreateMDBFile()
       {
          // Get the instance handle - required for loading the resource
          HINSTANCE hInst = AfxGetInstanceHandle();
    
          // Load the user-defined resource.
          HRSRC hmdbFile = ::FindResource(hInst, "mdb_file", "MDB_RESOURCE");
             HGLOBAL hRes = ::LoadResource(hInst, hmdbFile);
             DWORD dwResSize = ::SizeofResource(hInst, hmdbFile);
    
             if (hRes != NULL)
             {
                UINT FAR* lpnRes = (UINT FAR*)::LockResource(hRes);
                CString szFileName = "Filename.mdb";
    
                TRY
                {
                   // Create the .mdb file
                   CFile f( szFileName, CFile::modeCreate | CFile::modeWrite );
    
                   // Write the user-defined resource to the .mdb file
                   f.WriteHuge(lpnRes, dwResSize);
                   f.Flush();
                }
                CATCH( CFileException, e )
                {
          #ifdef _DEBUG
                 afxDump << "File could not be opened " << e->m_cause << "\n";
          #endif
                }
                END_CATCH
    
          #ifndef WIN32 //Unlock Resource is obsolete in the Win32 API
                ::UnlockResource(hRes);
          #endif
                ::FreeResource(hRes);
             }
          }
    						
???? ???? ??? ??????? ??? ???? ???? ????? ??? ??? .exe ???????? ??? ??? ??? .mdb. ??? ??? .mdb ????? ??? ?? 64 ???? ?? ??? ????? ??? .exe ?????? ????? 64 ???? ????. ???? ??? ????? ??? .exe ?? ????? ??? .mdb ????? ??? .exe ?????? ??? ????? ????? ??? ????? ??????.

?????

?????? ??? ???? ?? ????????? ??? ????? ??????? ?????? ????????? ???? ??????? Windows SDK.

?????? ??? ??????? ?????? ??? ????? ???? ?????? ??????? ?????? ?????? ???????? ??????? ?? "????? ????? Microsoft:
110507????? ????? ????? ?????? ODBC ??? ????

110508????? ????? ????? ?? ???? ????? Foundation

???????

???? ???????: 118609 - ????? ??? ??????: 30/????/1427 - ??????: 3.2
????? ???
  • Microsoft Foundation Class Library 4.2, ????? ?????? ??:
    • Microsoft Visual C++ 1.5 Professional Edition
    • Microsoft Visual C++ 1.51
    • Microsoft Visual C++ 1.52 Professional Edition
    • Microsoft Visual C++ 2.0 Professional Edition
    • Microsoft Visual C++ 2.1
????? ??????: 
kbmt kbdatabase kbhowto kbprogramming KB118609 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????118609
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? 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