ODBC Connection Check

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fred Zuckerman

    #1

    ODBC Connection Check

    With Access2k,
    I have a text control on my startup form that uses dlookup() on an
    ODBC-linked table.
    The linked table is actually on SQL Server and the link uses a .dsn file

    Sometimes, when the SQL Server is down (or messed up somehow), the link is
    not working.
    When that happens the startup form doesn't load properly and there is a
    30-45 second delay
    while A2k continues to try. Then the SQL Server error message displays.
    During this long delay,
    my users think that their screen is "locked up" and they ctrl-alt-delete to
    break.

    Is there some sort of connection check function that I can put in a module
    that will check the connection
    and return true or false, without taking 30-45 seconds?

    I'm not a VBA pro, so lots of details would be useful.
    TIA,
    Fred Zuckerman
    San Diego, CA, USA


  • Peter Flick

    #2
    Re: ODBC Connection Check

    Dear Fred,

    Why not just have a simple warning that the loading may take up to 1
    minute.

    Or you might like to try using the timer function in the form. You
    could try to fire off a Message with a count down from 1 minute. If
    the connection is OK, I am certain that no-one will complain if the
    result is faster than the remaining time shown on your message.

    Regards

    Peter

    Fred Zuckerman wrote:[color=blue]
    > With Access2k,
    > I have a text control on my startup form that uses dlookup() on an
    > ODBC-linked table.
    > The linked table is actually on SQL Server and the link uses a .dsn file
    >
    > Sometimes, when the SQL Server is down (or messed up somehow), the link is
    > not working.
    > When that happens the startup form doesn't load properly and there is a
    > 30-45 second delay
    > while A2k continues to try. Then the SQL Server error message displays.
    > During this long delay,
    > my users think that their screen is "locked up" and they ctrl-alt-delete to
    > break.
    >
    > Is there some sort of connection check function that I can put in a module
    > that will check the connection
    > and return true or false, without taking 30-45 seconds?
    >
    > I'm not a VBA pro, so lots of details would be useful.
    > TIA,
    > Fred Zuckerman
    > San Diego, CA, USA
    >
    >[/color]

    Comment

    Working...