1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Checking ADO connection

Discussion in 'C#' started by angelran, Oct 30, 2005.

  1. #1
    Hi guys,
    I have a problem with my ADO connection now. If the access data file is renamed or is moved to other location, how can i check that and give user a message (or redirect to other page) rather than display a system error page??

    cheers
     
    angelran, Oct 30, 2005 IP
  2. Arnica

    Arnica Peon

    Messages:
    320
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Either use the FileSystemObject to ascertain the availability of the file or trap the database error and act accordingly. A search for FileSystemObject and error handling in asp will pull up a wealth of resources.
     
    Arnica, Oct 30, 2005 IP
  3. BurgerKing

    BurgerKing Active Member

    Messages:
    397
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Hi,

    Here is a good link for how to check for the existence of your database file before attempting to connect to it.

    http://www.aspemporium.com/codelib.aspx?pid=31&cid=5
     
    BurgerKing, Nov 20, 2005 IP