Community Forums
Page 1 of 2 12 LastLast
Results 1 to 5 of 8

Thread: ODBC Error 1157 - Am I the only one?

  1. #1
    Join Date
    Oct 2001
    Posts
    44,727

    ODBC Error 1157 - Am I the only one?



    Hi,

    InstallShield Express 2 for Delphi 2.0 app - installing the BDE & ODBC.

    Try to run the ODBC administrator after install on a clean 95 machine and
    when I try to add a TextDriver data source it blows up with:

    "The setup routines for the MS Text driver... ODBC driver could not be
    loaded due to error code 1157"
    then:
    "Could not load the setup or translator library"

    I have wasted days on trying to track down this problem.
    Can someone help?

    Thank you for your time,

    Mike P.

  2. #2
    Join Date
    Oct 2001
    Posts
    44,727

    Re: ODBC Error 1157 - Am I the only one?



    Mike,

    This may occur if you have selected a Delphi 2.0, Visuall C++ 4, Visual
    Basic 4.0 project type and you are installing ODBC version 3.0.

    After you have selected your project add the following files to the "File
    Groups" of Express. The source and target directory for these files
    should be the windows system directory. If the file already exists in the
    "File Groups" list, there is no need to replace it.

    ODBC Core Files
    Src = <WINSYSDIR>
    Dest = <WINSYSDIR>
    DS32GT.DLL
    DS16GT.DLL
    ODBC32GT.DLL
    ODBC16GT.DLL
    ODBCINST.CNT
    ODBCINST.HLP
    ODBCCP32.DLL
    ODBCCP32.CPL
    ODBCAD32.EXE
    MSVCRT40 DLL
    ODBCTRAC.DLL
    ODBCINT.DLL
    ODBCCR32.DLL
    ODBC32.DLL

    Common files for all Desktop Drivers
    Src = <WINSYSDIR>
    Dest = <WINSYSDIR>
    ODBCJT32.DLL
    ODBCJI32.DLL
    ODBCTL32.DLL
    MSJET35.DLL*
    MSJTER35.DLL
    MSJINT35.DLL
    VBAJET32.DLL
    VBAR332.DLL
    MSRD2X35.DLL*
    MSREPL35.DLL
    MSVCRT40.DLL

    Desktop Driver specific files

    All the files have the Source and destination as <WINSYSDIR>
    Microsoft dBase Driver (*.dbf)
    MSXBSE35.DLL*
    ODDBSE32.DLL
    Microsoft FoxPro Driver (*.dbf)
    MSXBSE35.DLL
    ODFOX32.DLL
    Microsoft Access Driver (*.mdb)
    MSRD2X35.DLL
    ODBCJT32.DLL
    Microsoft Paradox Driver (*.db )
    MSPDOX35.DLL*
    ODPDX32.DLL
    Microsoft Excel Driver (*.xls)
    MSEXCL35.DLL*
    ODEXL32.DLL
    Microsoft Text Driver (*.txt; *.csv)
    MSTEXT35.DLL*
    ODTEXT32.DLL


    *All these files require the DLLSelfRegister string in the SWDEPEND.INI
    file.
    This has not been tested, but it should work.
    Dan

    Mike Panciroli <mpanciro@jhlassoc.com> wrote in article
    <01bc8315$645f2480$12803fce@mikepp5100>...
    > Hi,
    >
    > InstallShield Express 2 for Delphi 2.0 app - installing the BDE & ODBC.
    >
    > Try to run the ODBC administrator after install on a clean 95 machine and
    > when I try to add a TextDriver data source it blows up with:
    >
    > "The setup routines for the MS Text driver... ODBC driver could not be
    > loaded due to error code 1157"
    > then:
    > "Could not load the setup or translator library"
    >
    > I have wasted days on trying to track down this problem.
    > Can someone help?
    >
    > Thank you for your time,
    >
    > Mike P.
    >

  3. #3
    Join Date
    Oct 2001
    Posts
    44,727

    re:ODBC error



    Hi,
    > InstallShield misuses the "Description" keyword instead of creating an
    > own one. But this means you lose the posibilty to give your DataSource a
    > meaningful description text. Our users use this more regularily than one
    > thinks.
    >
    > To InstallShield: Please use a different keyword which and make it also
    > not appear in the argument string. (Something like ISODBC_DRIVER. Maybe
    > someone has a better idea how to link the driver and the DataSource. But
    > remeber that it is necessary for the call to SQLConfigDataSource to have
    > the server reference by it description name!)

    There is a workaround for the data source Description problem.

    The description of a data source will be the same as the description of the
    driver. To change this, you need to do the following.
    1. Open Odbc.rul and find the ISODBCInstallDSN function description.
    2. In ISODBCInstallDSN, locate the GetProfString call:
    // Get the driver description (the name of the driver //associated with the
    DSN as it
    // appears in the registry).
    GetProfString ( ISODBC_DRIVERSINI, szSection,ISODBC_DESCRIPTIONKEY,
    svResult );
    *3. Change the third parameter from ISODBC_DESCRIPTIONKEY to
    ISODBC_INI_DRIVERDESCKEY, thus:
    // Get the driver description (the name of the driver //associated with the
    DSN as it
    // appears in the registry).
    GetProfString ( ISODBC_DRIVERSINI, szSection,ISODBC_INI_DRIVERDESCKEY,
    svResult );
    4. Compile.
    5. Open the _Drivers.ini file in the project.
    6. Go to the DSN section for the DSN whose human-readable description you
    wish to set.
    7. Change the Description= entry to the human-readable form. For example:
    Description=My Microsoft Access Data Source
    8. Add an entry to the DSN section to identify the driver associated with
    this DSN. This driver id must be an exact match for an installed/existing
    driver. If using a driver that the ODBC setup installs, you must use the
    Description= entry from that driver's ini file section. For example, if my
    setup installs the Access driver, that Access driver section will have a
    Description=Microsoft Access Driver (*.mdb) entry in it. We must use this
    value for our DSN's ISODBCDriverDesc entry:
    ISODBCDriverDesc=Microsoft Access Driver (*.mdb)
    Notice how Description= is now used differently in driver sections and DSN
    sections.
    9. To make these changes permanent (so you don't have to do this for every
    new ODBC template project):
    Copy the odbc.rul and setup.ins files from your Script Files folder to
    <InstallShield5 folder>\TemplateData\ODBC 3.0 Template\Script Files.

    Copy the modified _drivers.ini file from your project to
    <InstallShield5 folder>\TemplateData\ODBC 3.0 Template\Setup
    Files\Compressed Files\0009-English\Intel 32
    *
    So, your _drivers.ini would now look like
    [my driver]
    Description=Microsoft Access Driver (*.mdb)
    .....

    [my data source]
    Description=This is my data source
    ISODBCDriverDesc=Microsoft Access Driver (*.mdb)
    ....

    --
    Rich
    InstallShield Software Corp.


    P.S. Our website, http://www.installshield.com/, covers a wide range of
    resources for your installation development. Read technical whitepapers,
    view documentation or search the Knowledge Base to get support information
    24 hours a day, 7 days a week.


    Weichmann Patrick <weichmann_p@simultan.ch> wrote in article
    <3444D2A5.F70C40FF@simultan.ch>...
    > Hi,
    >
    > 1. Problem with "Component not found in the registry RightCAD32."
    > ---------------------------------------------------------------------
    >
    > I was having trouble with the odbc template and still have some but your
    > problem is now solved. I had the same thing wrong and it took me some
    > time to figure it out.
    >
    > The problem is in your [RightCAD32] Section where you assign the
    > "Description" keyword a wrong value. The "Description" keyword is used
    > as the lpszDriver argument to SQLConfigDataSource which refers to a ODBC
    > driver by its descriptive name rather than a absolute filepath.
    >
    > So, to solve your problem change your section accordingly:
    > ...
    > [RightCAD32]
    > Description=Microsoft SQL Server
    > ...
    >
    > Why does it have to be Microsoft SQL Server?
    >
    > This name you define in the SQL Server section under "Description".
    > e.g.
    > [SQL Server]
    > Description=Microsoft SQL Server
    >
    > This name is needed for the call which creates the new DataSource.
    >
    > What is wrong generally?
    >
    > InstallShield misuses the "Description" keyword instead of creating an
    > own one. But this means you lose the posibilty to give your DataSource a
    > meaningful description text. Our users use this more regularily than one
    > thinks.
    >
    > To InstallShield: Please use a different keyword which and make it also
    > not appear in the argument string. (Something like ISODBC_DRIVER. Maybe
    > someone has a better idea how to link the driver and the DataSource. But
    > remeber that it is necessary for the call to SQLConfigDataSource to have
    > the server reference by it description name!)
    >
    > BTW: In the readme file of the ODBC 3.0 Template this is somehow
    > mentioned in chapter "Customizing a Project Created from the ODBC 3.0
    > Template" under point 3.f.
    >
    >
    > 2. ISODBCComponentName
    > -------------------------------
    >
    > Some information can be found in the ODBC 3.0 Template readme file in
    > chapter "Customizing a Project Created from the ODBC 3.0 Template" under
    > point 3.f.
    > ---NOTE: If your setup installs a driver and its location
    > is specified in that driver's data section
    > as
    > Driver=<COMPDEST>\Drivername.dll, and you
    > want to
    > install a data source that uses that
    > driver, you
    > cannot use <COMPDEST> in the data source's
    > Driver=
    > entry, expecting it to evaluate to the
    > same location.
    > <COMPDEST> evaluates to the value in the
    > Destination
    > field of the component identified in the
    > ISODBCComponentName= entry in the current
    > section.
    >
    > In short this means the following to me:
    >
    > You can use <COMPDEST> as a placeholder for the destination specified in
    > the components destination property. This is why you need to specify
    > additionally what Component it should look in.
    > So:
    > Driver=<COMPDEST>\sqlsrv32.dll
    > ISODBCComponentName=MY SQL SERVER Component
    >
    > If my Component has its destination property set to c:\mssql\binn then
    > the resulting string after processing will be
    > "Driver=c:\mssql\binn\sqlsrv32.dll" and this will then be used for the
    > installation of the driver, translator or dsn.
    >
    > You have to specify a ISODBCComponentName even if you never use
    > <COMPDEST>. The only exception are DSNs. There you can omit this if you
    > like. You could also specify everywhere the same component name. No one
    > cares.
    >
    >
    > Hope this helps.
    >
    > Regards,
    >
    > Patrick Weichmann
    > Simultan P&I AG
    >
    > --------------------------------------------
    >
    >
    >
    >
    > Doug Plaza wrote:
    >
    > > I am new to IS5 and I am trying to use the ODBC template to create a
    > > new
    > > setup. The only thing I have changed from the template setup is the
    > > _drivers.ini file. I keep on getting the following error; "Component
    > > not found in the registry RightCAD32." There is a copy of my
    > > _drivers.ini file below. What am I missing? What is the purpose of
    > > the
    > > "ISODBCComponentName=" line and what should it be set to? Any help
    > > would be greatly appreciated!
    > >
    > > [Options]
    > > ISODBC_SHOWODBCDIALOGS=FALSE
    > > ISODBC_SHOWERRMSGS=TRUE
    > > ISODBC_INSTALLCOREONLY=FALSE
    > >
    > > [Drivers]
    > > Driver1=SQL Server
    > >
    > > [Translators]
    > > Translator1=MS Code Page Translator
    > >
    > > [Data Sources]
    > > DSN1=RightCAD32
    > >
    > > [SQL Server]
    > > Description=Microsoft SQL Server
    > > Driver=<WINSYSDIR>\sqlsrv32.dll
    > > Setup=<WINSYSDIR>\sqlsrv32.dll
    > > APILevel=2
    > > ConnectFunctions=YYY
    > > DriverODBCVer=02.50
    > > FileUsage=0
    > > SQLLevel=1
    > > ISODBCComponentName=ISODBC ODBC 30\ISODBC Microsoft SQL Server Driver
    > >
    > > [MS Code Page Translator]
    > > Description=MS Code Page Translator
    > > Translator=<WINSYSDIR>\MSCPXL32.DLL
    > > Setup=<WINSYSDIR>\MSCPXL32.DLL
    > > ISODBCComponentName=ISODBC ODBC 30\ISODBC MS Code Page Translator
    > >
    > > [RightCAD32]
    > > Description=SQL Server
    > > Driver=<WINSYSDIR>\sqlsrv32.dll
    > > DSN=RightCAD32
    > > DefaultDir=
    > > DBQ=
    > > UID=
    > > Server=RD
    > > Database=RCSQL
    > > FastConnectOption=No
    > > UseProcForPrepare=No
    > > OEMTOANSI=No
    > > LastUser=sa
    > > Language=us_english
    > > ISODBCComponentName=RightCAD Files
    >
    >
    >
    >

  4. #4
    Join Date
    Oct 2001
    Posts
    44,727

    re:ODBC Error 1157



    I have now found the solutiion to my problem. My FoxPro driver file
    (ODFOXPRO.DLL) was not being installed. I found out the source of the
    problem by installing my project on a fresh installation of Windows 95, I
    then gradually copied the files I was installing to ther appropriate place
    untill the error dissapeared.

    Nick Hanlon wrote in message <35a9d914.0@news.installshield.com>...
    >Hello install shield experts,
    >
    >I have Install shield 5.1 Pro and I have copied the relevant parts of the
    >ODBC 3.0 template into my project, i'm installing the FoxPro driver with a
    >data source, I know this error number means that a dll is missing, but from
    >where and which one!!!!
    >
    >I've read that it's MSJET35.DLL missing from the windows system directory
    >because a file group is not being install, is this true, is so what could
    be
    >going wrong?
    >
    >I have see many people asking about this error but no documentation.
    >
    >Thanks
    >
    >Nick Hanlon
    >
    >Cognito Software Ltd.
    >
    >www.cognitosoftware.co.uk
    >
    >nik.hanlon@cognitosoftware.co.uk
    >
    >


  5. #5
    Join Date
    Oct 2001
    Posts
    44,727

    re:ODBC Error 1157



    I meant ODFOX32.DLL


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •