Hide friendly ODBC connection error message

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark Day

    Hide friendly ODBC connection error message

    Hi All,
    I have an application that links tables to an ODBC source. The DSN
    parameters are obtained from a custom .ini file. An incorrect DSN string
    gives the user a 'friendly' connection error message that I would like to
    supress in order to provide my own error message. This happens when using
    ..RefreshLink method. I already have an error handler in place, but it
    doesn't reach this before displaying the friendly message.

    I have tried disabling the SetWarnings to False, but this doesn't work
    either.

    Any ideas please?
    TIA
    Mark Day.



  • Trevor Best

    #2
    Re: Hide friendly ODBC connection error message

    Mark Day wrote:
    [color=blue]
    > Hi All,
    > I have an application that links tables to an ODBC source. The DSN
    > parameters are obtained from a custom .ini file. An incorrect DSN string
    > gives the user a 'friendly' connection error message that I would like to
    > supress in order to provide my own error message. This happens when using
    > ..RefreshLink method. I already have an error handler in place, but it
    > doesn't reach this before displaying the friendly message.
    >
    > I have tried disabling the SetWarnings to False, but this doesn't work
    > either.
    >
    > Any ideas please?[/color]

    What happens instead of your error handler? Are you using DAO? (I
    presume you are with the .RefreshLink method). Is it that it will bring
    up another connection dialog so the only error returned to the app is
    one of "user cancelled"?

    --
    Error reading sig - A)bort R)etry I)nfluence with large hammer

    Comment

    Working...