Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Location
    Loughborough (UK)
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pop-up window, Connection Problem

    Hello all.

    I'm producing a data entry system for my work. The user uses a number of radio boxes to make their selections etc. When they click no, a pop-up window is produced which requests more information. This window uses a connection include file to source data from the database. When they have inputted that, the window closes and they return to the main page. However, if they press no on another radio button too soon after the window closes, then I get the following error. Any ideas?

    - - - - - - - - -
    Provider error '80004005'

    Unspecified error

    /dir/conninclude.asp, line 5
    - - - - - - - - -


    the connection include is as follows...


    - - - - - - - - -
    <%
    dim oConnection
    set oConnection = Server.CreateObject("ADODB.Connection")
    oConnection.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath ("db1.mdb")
    oConnection.Open
    %>
    - - - - - - - - -

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    just a thought;

    do you close the connection (after the popup is filled with info from the database ?)

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Location
    Loughborough (UK)
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Close Connection

    At the bottom of the page I have the following code. Not sure if that's all it needs but it doesn't seem to resolve my problem.

    <%
    oConnection.Close
    %>

  • #4
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmm.

    i add a
    set oConnection = nothing
    to it to free the space it takes. but that probaly wount couse the problem

    Are you sure it is placed appropriatly ? i mean if you have somehting like
    Code:
    !!!!warning bad code !!!!!!!
    
    redirect("test.asp")
    oConnection.Close
    then the connection woun't be closed

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Location
    Loughborough (UK)
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Bad Code?

    Bad code? Me? ... Ok, probably! My pop-up window contains a form, you click the submit button, the action is a seperate page, which at the moment, ONLY contains the following code. Any ideas? Please!

    <%
    set oConnection = nothing
    %>

    <script language="javascript">
    window.close()
    </script>

  • #6
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what do you mean ?

    which at the moment, ONLY contains the following code. Any ideas? Please!
    so you post a form and don't do anythink else then close the window?Why the connection close ?

    I meant: close connection+set to nothing in the asp that creates the form (or that processes it and if you open a connection to proces it)
    I'm not sure how IIS works with multi-window sessions. I'll take a look in my asp debugging book, but it might not ba an asp problem

    I've got some similar things running (open window/generate page/print/close window) and never had a problem with it.

  • #7
    Regular Coder
    Join Date
    Nov 2002
    Location
    Loughborough (UK)
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Sorry!

    Now I have got around to entering all the code and the pop-up window actually does something, it all works fine. Thanks for your help!


  •  

    Posting Permissions

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