I'm opening a database using

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.CursorLocation="3"
Conn.ConnectionTimeout=30
Conn.Open "mp"

which works fine, what I want to be able to do if there is any errors during this process to set a flag which then stops the rest of my page doing any database work.