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 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Round Rock, Texas
    Posts
    443
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Code Restructuring causes execution failure

    I have a very perplexing problem. I am restructuring an existing, working web page but the new page is failing at two out of three stored procedure calls. I simply do not know why.

    My restructured code both "adds" and "updates" data on a database. Right now I'm working on the "update" stuff. In the restructured code, follow the "update" logic paths. Focus on the "lock record" stuff.

    Code execution synopsis:
    The "update" page is called, passing in a DB key for the record we want to edit. Three stored procedures are executed in this order:
    [list=1][*]A list of "organization types" is created - this works. The <select> dropdown is populated[*]The record to update is "locked" (NO, it is not really locked. An entry is made in a "locked records" table) This does not work in the restructured page.[*]The record data is fetched. This does not work in the restructured page. It's execution is not dependent on the "record lock" success. Trust me. This home grown record lock stuff is pretty bogus. Please don't get hung up on it.[/list=1]

    The code in lockRecord() is failing right where the ADO command.Execute is called. The VBSCript quits, and the web page is rendered on the client screen.

    What is Known
    • The original web page works. All stored procedures work as expected. A record is created in the locked Records table and the data is put into the HTML <input> fields for editing.
    • The code that builds the ADO command is exactly the same in the original and restructured code
    • The call to this code is the same
    • For a given test case, the parameter list of the call is exactly the same in original and the restructured code
    • The ADO command parameters for both the original and restructrued code lines looks to be exactly the same in number, order, type, and value.
    • The fact that a forced error in the stored procedure (RAISEERROR) does not display it's message indicates that the SP is not being called - in the restructured code file.
    • The stored procedure works on the original web page
    • The stored procedure works in query analyzer given the test set of parameters


    Test case parameter list for the recordlock() function
    • SessPersonID = 16
    • OrgID = 17
    • 3rd parameter is a string literal
    • lockedMessage = ""
    • objConnection is the ASP connection object (code not included)
    • ReturnValue = 20000


    the attachment
    I had to merge 3 independent files into one. The parts are:
    • The original data update web page
    • The restructured web page
    • an "include" file that calls the stored procdured

    Execution Environment
    • Client - IE 5.5 & Win98
    • Server - IIS v4.0
    • Database - MS SQL Server 2000
    Attached Files Attached Files

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The fact that a forced error in the stored procedure (RAISEERROR) does not display it's message indicates that the SP is not being called - in the restructured code file.
    Actually that may indicate that your browser (IE) has the option "Show Friendly Error Messages" turned on and as a result all the useful information which would tell you what's going on is removed from the error page.

    Given the other points you've stated, I think you'd better look at that.
    Check out the Forum Search. It's the short path to getting great results from this forum.


  •  

    Posting Permissions

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