Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Can anyone tell me why this isn't working?

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,63799
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Can anyone tell me why this isn't working?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Can anyone tell me why this isn't working? - 8/26/2008 2:13:08 AM   
  obiwaynekenobi

 

Posts: 3
Score: 0
Joined: 3/12/2008
Status: offline
Clasisc ASP is by no means my forte, and I have inherited a huge (1000+ files), spaghetti-code ridden application.

I am trying to figure out why this snippet of code is not working right.. here's the scenario:  We have an application which queries a database for order line items, and displays them on a form.  I have verified that the product description exists in the database, and wrote a very basic ASP page to test the functionality - this was proven to work correctly.  The value is obtained at the beginning of the page, like so (code is not mine, so all bad practices are not my fault):


      

The "getFromDatabase" function just opens an ADODB connection, executes the passed-in sql, and opens the passed-in recordset.  Anyways, the issue is that the value of rsTemp("pDesc") is not modified at all, yet several hundred lines down the page (again, not my code so it's rather messy), when I check the value of it again, it is mysteriously empty (i.e. rsTemp("pDesc") = "")!  As I said, nothing else on the page is modifying it, it's only being displayed later on as the value in a textbox, but since it's empty nothing is being shown.

I'm at a loss for how to fix this, because I'm not seeing why it's happening in the first place.  Can anyone shed some light?  I can't feasibly post the entire page's code, as it's some 900 lines, but I will try to provide more information if possible.  Also, as much as it pains me I cannot remove On Error Resume Next, or the entire application breaks in dozens of different places.
 
 
Post #: 1
 
 RE: Can anyone tell me why this isn't working? - 8/27/2008 12:31:57 AM   
  Rischip


Posts: 502
Score: 2
Joined: 3/26/2007
Status: offline
You can replace On Error Resume Next in a portion of the code that you are troubleshooting with On Error Goto 0.
Then past the code you are troubleshooting resume On Error Resume Next.
This should get you some small insight into the code with issues. There is also not enough code here to troubleshoot anything. At least not for me.

_____________________________

Rischip
Author of - The Grim Linker

(in reply to obiwaynekenobi)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Can anyone tell me why this isn't working? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts