我下载了setup factory6的odbc Configuration组件,看帮助说只要修改InstallODBC.ini文件,再运行InstallODBC.exe就可以建odbc了;
以下是默认得InstallODBC.ini内容(里面的example是for access的)
---------------------------------
; ConfigODBC.INI; Do not modify the following section!
[IndigoRose]
ID=IRINSTODBC
Desc=Indigo Rose ODBC Configuration Utility
Copyright=Copyright (c) 1999 Indigo Rose Corporation
License=Please contact Indigo Rose Corporation for licensing info
Info=http://www.indigorose.com; The following sections can be edited[Settings]
; The title bar message
Title=Configuring ODBC
; The dialog window message
LoadMessage=Installing ODBC Drivers...[InstallManager]
; 0 = FALSE, 1 = TRUE
; Install=1[Drivers]
; Specify a setup string.  See SQLInstallDriverEx in the ODBC documentation for help.
; Use "\0" to represent null bytes - put two at the end
; Use Driver1=, Driver2= ... Driverx
; Example...
; Driver1=Microsoft Access Driver (*.mdb)\0Driver=odbcjt32.dll\0Setup=odbcjt32.dll\0FileUsage=1\0FileExtns=*.mdb\0APILevel=1\0ConnectFunctions=YYN\0DriverODBCVer=02.50\0s=YYN\0SQLLevel=0\0\0[Data Sources]
; Specify a setup string.  See SQLConfigDataSource in the ODBC documentation for help.
; Use "\0" to represent null bytes - put two at the end of DSAttribX
; DSRequestX = ODBC_ADD_DSN,ODBC_CONFIG_DSN,ODBC_REMOVE_DSN,ODBC_ADD_SYS_DSN,ODBC_CONFIG_SYS_DSN,ODBC_REMOVE_SYS_DSN
; Use DSDriver1=, DSAttrib1=, DSRequest1=, DSDriver2=, DSAttrib2=, DSRequest2= ... DSDriverx=, DSAttribx=, DSRequestX=
; Example:
; DSDriver1=Microsoft Access Driver (*.mdb)
; DSAttrib1=DSN=QandA\0DBQ=J:\DATABASE\QandA.mdb\0FIL=MS Access;\0DESCRIPTION=Questions and Answers Database\0DRIVERID=25\0UID=\0\0
; DSRequest1=ODBC_ADD_DSN
---------------------------------
怎么修改成建sql server的odbc???

解决方案 »

  1.   

    ; ConfigODBC.INI; Do not modify the following section!
    [IndigoRose]
    ID=IRINSTODBC
    Desc=Indigo Rose ODBC Configuration Utility
    Copyright=Copyright (c) 1999 Indigo Rose Corporation
    License=Please contact Indigo Rose Corporation for licensing info
    Info=http://www.indigorose.com; The following sections can be edited[Settings]
    ; The title bar message
    Title=Configuring ODBC
    ; The dialog window message
    LoadMessage=Installing ODBC Drivers...[InstallManager]
    ; 0 = FALSE, 1 = TRUE
    ; Install=1[Drivers]
    ; Specify a setup string.  See SQLInstallDriverEx in the ODBC documentation for help.
    ; Use "\0" to represent null bytes - put two at the end
    ; Use Driver1=, Driver2= ... Driverx
    ; Example...
    ; Driver1=Microsoft Access Driver (*.mdb)\0Driver=odbcjt32.dll\0Setup=odbcjt32.dll\0FileUsage=1\0FileExtns=*.mdb\0APILevel=1\0ConnectFunctions=YYN\0DriverODBCVer=02.50\0s=YYN\0SQLLevel=0\0\0[Data Sources]
    ; Specify a setup string.  See SQLConfigDataSource in the ODBC documentation for help.
    ; Use "\0" to represent null bytes - put two at the end of DSAttribX
    ; DSRequestX = ODBC_ADD_DSN,ODBC_CONFIG_DSN,ODBC_REMOVE_DSN,ODBC_ADD_SYS_DSN,ODBC_CONFIG_SYS_DSN,ODBC_REMOVE_SYS_DSN
    ; Use DSDriver1=, DSAttrib1=, DSRequest1=, DSDriver2=, DSAttrib2=, DSRequest2= ... DSDriverx=, DSAttribx=, DSRequestX=
    ; Example:
    ; DSDriver1=Microsoft Access Driver (*.mdb)
    ; DSAttrib1=DSN=QandA\0DBQ=J:\DATABASE\QandA.mdb\0FIL=MS Access;\0DESCRIPTION=Questions and Answers Database\0DRIVERID=25\0UID=\0\0
    ; DSRequest1=ODBC_ADD_DSN
    ---------------------------------
    怎么修改成建sql server的odbc???
    换变量,重新命名.
      

  2.   

    Setup Factory就用过。
    ODBC没作过。给你UP一下。
      

  3.   

    Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Hykjb;Data Source=dev
    ============================
    @* .☆ / */ . / * . ☆/ *。
       ◢◣。       ◢◣。
      ◢★◣。     ◢★◣。
     ◢■■◣。   ◢■■◣。
    ◢■■■◣。 ◢■■■◣。
    ︸︸||︸︸ !!︸︸||︸︸
    愿您有快乐的每一天 ^_^!!
      

  4.   

    我以改成如下:
    [Drivers]
    ; Example...
    Driver1=SQL Server\0Driver=sqlsrv32.dll\0Setup=sqlsrv32.dll\0FileUsage=0\0APILevel=2\0ConnectFunctions=YYY\0DriverODBCVer=02.50\0SQLLevel=1\0\0[Data Sources]
    ; Example:
    DSDriver1=SQL Server
    DSAttrib1=DSN=msris\0Database=\0Driver=sqlsrv32.dll\0LastUser=sa\0Server=(local)\0\0
    DSRequest1=ODBC_ADD_DSN为什么还是老是通不过,报错:failed to config ODBC
      

  5.   

    真是对不起,我对VC+database了解很少帮你UP
      

  6.   

    DSDriver1=SQL Server
    DSAttrib1=DSN=msris\0Database=\0Driver=sqlsrv32.dll\0LastUser=sa\0Server=(local)\0\0
    你数据库还没指定阿