Configuring a ODBC DSN using InstallODBC.exe for a SQL Server database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • candideiroforos
    Forum Member
    • Jul 2003
    • 1

    Configuring a ODBC DSN using InstallODBC.exe for a SQL Server database

    Hi everybody... I've read the knowledge base articles about how to create a dsn automatically using InstallODBC.exe.

    I've try to configure the InstallODBC.INI...without succesfull..
    this is the code... but the program returns error:

    THIS IS THE ONLY PART THAT I'VE MODIFIED IN THE INI FILE:
    [Data Sources]
    DSDriver1= SQL Server
    DSAttrib1=DSN=ServerPCTest\0SERVER=VerPC\0UID=cont roladmin\0PWD=\0DESCRIPTION=Sistema de control Administrativo de PRUEBA\0\0
    DSRequest1 = ODBC_ADD_DSN


    All the examples that I've seen are for Access but my database is in SQL Server 7.0..
    someday can help me? .... please... I need it!! ...
    thanks!!
  • user2003GG
    Forum Member
    • Jul 2003
    • 2

    #2
    Re: Configuring a ODBC DSN using InstallODBC.exe for a SQL Server database

    I have the same problem too. Does anyone have a solution for this. It would be useful if Indigo would publish some docs about this.

    Thanks
    user2003GG

    Comment

    • Darryl
      Indigo Rose Staff Member
      • Jul 2001
      • 1908

      #3
      Re: Configuring a ODBC DSN using InstallODBC.exe for a SQL Server database

      If you send your INI file to [email protected] we'll see if you possibly missed something and take a closer look.

      Also what was the error message returned by your program?

      Comment

      • user2003GG
        Forum Member
        • Jul 2003
        • 2

        #4
        Re: Configuring a ODBC DSN using InstallODBC.exe for a SQL Server database

        Please find enclosed the .INI file I use. It's named InstallCSF.ini because
        I have more than one DSN to configure (according to the selected packages),
        thus I've splitted them in different InstallXXX.exe / InstallXXX.ini couples
        of files.

        UID, PWD and DESCRIPTION could be left out without problems.

        DSDriver1={SQL Server} is between curly brackets to maximize compatibility
        with older versions of the driver, but the brackets could be left out also.

        DSRequest1=ODBC_ADD_SYS_DSN doesn't work even with ODBC_ADD_DSN (User DSN
        instead of System DSN).

        Obviously we tried all said combinations.

        SQL Server driver is version 2000.85.1022.00


        The resulting message is:
        Failed to configure ODBC Data Source.

        Thanks for your attention.
        user2003GG

        ---------------------------------------------------
        ; 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\0 FileUsage=1\0FileExtns=*.mdb\0APILevel=1\0ConnectF unctions=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_DS N
        ; Use DSDriver1=, DSAttrib1=, DSRequest1=, DSDriver2=, DSAttrib2=, DSRequest2= ... DSDriverx=, DSAttribx=, DSRequestX=
        ; Example:
        ; DSDriver1=Microsoft Access Driver (*.mdb)
        ; DSAttrib1=DSN=QandA\0DBQ=J:\DATABASE\QandA.mdb\0FI L=MS Access;\0DESCRIPTION=Questions and Answers Database\0DRIVERID=25\0UID=\0\0
        ; DSRequest1=ODBC_ADD_DSN

        DSDriver1={SQL Server}
        DSAttrib1=DSN=CSF\0DESCRIPTION=CSF\0SERVER=BDCSERV ER\0UID=csf\0PWD=csf\0\0
        DSRequest1=ODBC_ADD_SYS_DSN

        Comment

        Working...
        X