Check if the database exist AND FORWARD!!!!!!!!!!!

Results 1 to 2 of 2

Thread: Check if the database exist AND FORWARD!!!!!!!!!!!

  1. #1
    HeinZ Guest

    Default Check if the database exist AND FORWARD!!!!!!!!!!!

    Hi,<BR><BR>I&#039ve a database driven web-site.<BR>The database is 4 Mb.<BR>When I upload the database, the whole site doesn&#039t work.<BR><BR>I open the database with:<BR><BR>&#060;%<BR><BR>Set Conn = Server.CreateObject("ADODB.Connection")<BR><BR>Set RS = Server.CreateObject("ADODB.RecordSet")<BR><BR>Conn .Open Session("TEST")<BR><BR>RS.Open "SELECT COUNT (*) FROM Adress WHERE name=&#039pete&#039", Conn, adOpenKeyset,adLockReadOnly <BR><BR>%&#062;<BR><BR>When the database doesn&#039t exist:<BR><BR>==================================== = <BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified <BR><BR>/test/main.asp, line 28 <BR>=====================================<BR><BR>B ut I want that when the visitor comes to main.asp, and the database doesn&#039t exist (I&#039m uploading it), the visitor is forwarded to error.asp. In this error.asp there&#039s a script that looks if the database already exist. (what is that script???)<BR><BR><BR>Can anybody help me writing such scripts?<BR>On Error Resume Next<BR><BR>If Err.Number =80004005 Then<BR><BR>response.redirect("error.ASP")<BR><BR> End If<BR><BR>%&#062;<BR><BR>doesn&#039t work.<BR><BR>It is a MS Access 97 database with a ODBC.<BR><BR>Thanx

  2. #2
    Join Date
    Dec 1969

    Default RE: Check if the database exist AND FORWARD!!!!!!!

    I am not sure about your error question, but this suggestion might help with the amount of downtime. Upload you database as a different name then the original so it doesn&#039t replace it. Once it is uploaded, delete the old one and rename the new one. Total down time is about 20 seconds. Just a thought.<BR><BR>Brandon

Posting Permissions

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