I get an error after the problem is solved!

Results 1 to 3 of 3

Thread: I get an error after the problem is solved!

  1. #1
    Alun Parry Guest

    Default I get an error after the problem is solved!

    I have produced a program that will walk users through a database ten records at a time, automatically creating Next and Prev buttons where appropriate as it goes. And that worked fine...I&#039m using adOpenStatic for the cursor.<BR><BR>Next came the error handling. So I added some error handling to the program and to test it I moved the DSN database to another folder to deliberately produce an error. All well and good, the error handling works. It produces the expected error of not being able to find the database.<BR><BR>Yet when I move the DSN database back to the correct folder and run the asp page again - it still fails - and with the same error. Similarly, other earlier progs that I wrote with an adOpenStatic cursor fail too.<BR><BR>I have another program that uses the default cursor that simply lists all records from start to EOF - and if I run that program, then I don&#039t get the error - it works ok. If I run my ten-at-a-time program straight afterwards, all is working again.<BR><BR>I cant get my head around this. Is there something about cursors that I&#039m perhaps missing - or is there another answer to why this is happening?<BR><BR>Thanks for your help<BR><BR>Alun

  2. #2
    Join Date
    Dec 1969

    Default RE: I get an error after the problem is solved!

    In your error checking, do you close the connection and/or recordset as well as display the error?<BR><BR>HTH<BR><BR>Jerry

  3. #3
    Alun Parry Guest

    Default RE: I get an error after the problem is solved!

    Jerry<BR><BR>I havent done no. I read that this is done automatically.<BR><BR>Are you saying that my code should be something like:<BR><BR>If Err.Number&#060;&#062;0 Then<BR> MembersRS.Close<BR> MembersRS=Nothing<BR> Response.Write "Error"<BR> Err.Clear<BR>End If<BR><BR>Plus, why does the other program (ie the one that shows them all) still work. <BR><BR>Cheers<BR><BR>Alun<BR>

Posting Permissions

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