????? ????? ????? ?????? ODBC ??? ????

?????? ????????? ?????? ?????????
???? ???????: 110507 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

????? ????? ????? ????? ?????? ODBC (????? ????? ???????? ???????) ???????. ????? ??? ?????? ????? ???????? ??? ??? ??????? ????? ODBC ?? ????? ???? ?????? ????? ????? ???????? ???? ???? ?? ??? ????????. ??? ?? ? ??? ???? ??????? ????? ?????? ??????? ODBC API (????? ????? ?????????) ?????? ??? .XLS. ?????? ????? ?????? ?????? SQLConfigDataSource().

?????? ?????? ?????? SQLConfigDataSource ?????? ???? ?????? Excel ???? ???? "???? ?????? Excel ????":
   SQLConfigDataSource(NULL,ODBC_ADD_DSN,
     (LPSTR) "Excel Files (*.xls)",
     (LPSTR) "DSN=New Excel Data Source\0"
     "Description=New Excel Data Source\0"
     "FileType=Excel\0"
     "DataDirectory=C:\\EXCELDIR\0"
     "MaxScanRows=20\0");
???? ?? ???? ???????? ?????? (C:\EXCELDIR) ????. ???? ?????? ????? Excel ??????? ?????? ???????? ?????? ??? ???????? ??? ??????? ??????? (???? ???? ??? ??? .XLS).

?????? ??? ??????? ?????? ??? ????? ????? ?????? ?????? article(s) ??????? ?? "????? ??????? ?? Microsoft:
110508????? ????? ??? ???? ????? Foundation
???? ????????? ????? ???????? ???? ??? ??????? ??? ?????? SQLConfigDataSource() ODBC API. ???????? ???? SQLConfigDataSource() ??? ?? ????? ????? ??? ODBCINST.H ?? ??????? ????? ????????? ODBCINST.LIB.

??????: ??????? ??????? 32-?? ??? ?? ???? ????? ODBCINST.H ??? ?????? ???? ???? ???? ??? ?? ODBCCP32.lib

??????: ?? ????? ????????? ???????? ??? ??? ??????? ?? '??????? ?? ?????? MFC' ???? ??? ????? ?? 4.0 Visual C++. ???? ?????? ??? ????? ??? ??????? ??? ???????? ?? ???? ????? ?? "SQLConfigDataSource" ????? ??????? ?????? ' FAQ: ??????? ????? ???? ???????? ODBC '.

??????? ????

??????: ????? ??? ??????? ????? ????? ?????? ODBC 16 ?? ???. ?????? ????? INI ?????? ????????? ??? datasources ???????? (ODBC.INI) ?????? ODBC 16-?? ?? ????? ????? ??????? (ODBCINST.INI). ?????? ODBC 32-?? ?? ??? ?????? ????? INI ???? ????? ?? ???? ????? ??? ????????? ??? ???????. ??????? ???? ?????? ?????? ???? ????? ??????? ?????? ??????? ?????? ?? ODBC\ HKEY_LOCAL_MACHINE\SOFTWARE\ ?? ODBC.INI ? ODBCINST.INI ? ??? ???????. ??? ????? datasources ?????? ???? ?? HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI. ?? ???? ??????? ????? ODBC.INI ??? ?? ??? ?????? ??? ??? ??????? ??? ?????? ??????? ??????? ??? ??? ?????? ?????? ODBC 32-??.

???? ????? ??? ???? ?????? ODBC ???????? ????? ODBC ???????? ?? ?????? ???????? ??????. ??? ???? ?? ??? ??????? ??? ??????? ?????? ??? ???? ?????? ?????? ?? ??????? ????? ?? ???? ???? ?????? ??? ?? ?????? ??? ?????? ???????? ??? ????? ?????? ?????? ??????.

????? ODBC (????? ????? ?? ???? ???? Windows) ?????? ???? ?????? ???? ?? ???? ??? ??????? ?? ????? ODBC.INI. ?? ????????? ??? ??? ????? ?????? ????? ????? ????? ODBC ?????? ??? ????????? ???????? ??? ???? ????????. ?? ????? ?? ???? ?? ?? ????????? ???? ????? ??? ?? ??? ?? ODBC.INI ??? ?? ?? ?? ????? ?? ??????? SQLConfigDataSource().

??? ????? ?? ??? ?? ??? ????? ??? ????????? ?????? ??? ????? ODBC.INI [??? ??????? SQLConfigDataSource()] ? ??? ???????? ?? ????? ??? ??? ????? ??????? ???? ?????? ????? ?????? ??????? ?????? ??? ???????? ?????? ??. ??? ?????? ?????? ???? ??? ????? ????? ????? ODBC ?????? ???????? ??? ????? ???????? ?????? ?????? ?? ??? ??? ?? ????? ?????? ??? ???????. ???? ???? ??? ??????? ???? API ????? ??? ?????.

???? ? ???? ??? ?????? ?????? SQLConfigDataSource(). ??? ??? ?????? ?? ????????? ?? ???? ????????? API ODBC ???????? ?? Visual C++ ??????? 1.5. ????? ??????:
   BOOL SQLConfigDataSource(HWND hwndParent,UINT fRequest,
                            LPCSTR lpszDriver,
                            LPCSTR lpszAttributes);
hwndParent - ??? ?? ?????? ???? ???? ???????? ????? ?????? ?????? ???? ??? ??????? ?????? ????? ?????? ??????? ?? ?????? ????? ODBC ????? ?????? ??? ??????? ?????? ?? ???????? ??? ???? ???????? ??????. ??? ?? ??? ???? ??????? ????? ??? ??????? ?? ??????? lpszAttributes ? ????? ???? ????. ?? ???? ????? ??? ???????, ???? ???? ???????.

fRequest - ??????? ???? ??????. ????? ????????:
                      ODBC_ADD_DSN: Add new user data
                        source.
                      ODBC_CONFIG_DSN: Modify an
                        existing data source.
                      ODBC_REMOVE_DSN: Remove an
                        existing data source.
????? ??????? ???? ?????? ?? ODBC 2.53.0 ?? ???? ??? 32-?? ???:
                      ODBC_ADD_SYS_DSN: Add a new
                        system data source.
                      ODBC_CONFIG_SYS_DSN: Modify
                        an existing system data
                        source.
                      ODBC_REMOVE_SYS_DSN: Remove
                        an existing system data
                        source.
lpszDriver - ??? ?????? ???????. ??? ?? ???? ?????? ??????? ??? ?? ????? ????? ?????????? ????? ?? ?????? ??????? ??????? (DLL). ????? ????? ??? ?????? ????? ???????? ?????? "????? ODBC" ??? ???:

  1. ?? ?????? ?????? "????? ODBC.
  2. ???? ?????. ??? ????? ????? ????? ??????? ???????.
????? ??????? ??? ??? ?????? ???????. ??? ??? ????? ???? ???????? ?????? lpszDriver. ???? ??????? ??? ??????? [??? ???? ??????? "????? Excel (*.xls)"] ??? ?? ??? ???? ????? ???????? ??? ???? ?????? ?? ?????.

???? ???????? ????? ??? ??? ODBCINST.INI ????? ????? ??? ????? ?? ???? ??????? ?????? ??????? ?????? ?? ?????? [????? ????? ODBC].

lpszAttributes - ????? ?????? ?? ??????? "keyname = ????". ??? ??? ??? ??????? ?????? terminators ????? ?? ????? terminators ????? ??????? ?? ????? ???????. ????? ??? ?????? ???? ????? ????????? ?????? ??????? ??????? ?????????? ???? ????? ??? ??? ODBC.INI ????? ???????? ??????. ?? ?????? ????? ????, ???? ??? ???? ?? ???? ODBC API ???? ?????? "DSN" ???? ???? ??? ???? ?????? ????. ???? ????????? ????? ???? ?????? ????? ???? ?????? ????. ???? ?????? ?? ???? ??? ?? ??????? ????? ALL ????????? ??? ?????? ??????? ???? ?????? ???????? (??? ?? ??? hwndParent NULL) ?? ?????? ?????? ?? ????? ???????. ?? ????? ??? ????? ????? ?????????? ???? ???? ???? ?? ??? ?????? ????????.

???? ????? ?????? ??? keynames ?????? ?????? ??? ?? ??? ??????? ??????? ????? ?????? ????? ?????? (???? ???? ?? ?????? ?????? ?????? "????? ODBC):

??? ??? ?????? ?? ????? ?? ?????? ??? ????? ?????? ?? ????? ????? ???????. ??? ???? ?? ???? ?????? ????? ?? ???? ????? ????? ?????? ??? ?????. ????? ???? ?? ???? ??????? ??????? ??????. ?????? ??? ??????? ??????? ??? ???? ???????? ?? ????? ??? ??????. ?? ????? ??????? ????? ?? ???? ???? ?????. ?????? ??? ???? ?? ????????? ??? ????? ??? ???? ???????? ?? ????? ????????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
322756????? ??? ???? ???????? ? ??????? ??????? ?? Windows

  1. ???????? regedit ????? ??? HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\
  2. ?????? ??? ???? ???????? ?? ??? ???? ???????? ????? ??. ???? ???? ????? ?????? ????????. ?????? ????? ??? ??????? ?????? ???? ??? ??? ??????? ?????? ? ???? ??? ??? ??? ???? ?????????.
?? ???? ????? ?? ??? ????? ?????? ????? ???? ???? ???????. ???? ?????? ??? ??????? ????? ?? ????????? ??????? ?????? ??? ?????? ??????? ???? ???? ?????? ????? ?? ???? ????? "????? ODBC: ???? ??? ????? ???? ??? ?????? ??????? ???? ??? ?????. ??? ??????? ????????? ?????? ???? ?????? ???? ??????? ????, ??? ?????????. ????? ??? ??? ??? ??? ????????? ??? ?????? ???? ???? ???? ??? ????? ??? ??????? ???? ????? ??????? ?????? ???????.

?????

ODBC ????????? ?????? ? ???? SDK (????? ?? ????????).

???????

???? ???????: 110507 - ????? ??? ??????: 11/????? ??????/1425 - ??????: 3.2
????? ???
  • Microsoft Data Access Components 1.5
  • Microsoft Data Access Components 2.0
  • Microsoft Data Access Components 2.1
  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.6
  • Microsoft Data Access Components 2.7
????? ??????: 
kbmt kbdatabase kbhowto KB110507 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????110507

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

 

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