Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467

    Unanswered: How do I unit test asp script. Need help with my ignorance

    Here is the URL I submit.

    http://telus.wellsfargo.com:7777/doc...t/dev/2054.rdf

    I do not get an error, but the expected result (insert into a table) does not happen). I have unit tested my stored procedure and that works fine. When I submit the above URL as I said nothing happens.

    Here is the code for log.asp

    Code:
    <%@ Language=VBScript %>
    
    <!-- 
    include alert.asp
    -->
    
    <%
    response.buffer = TRUE
    response.expires = TRUE
    
    On Error Resume Next
    
    
    
    
    dim queryStr 
    queryStr = request.QueryString("action")&request.form
    
    
    
        Set Comm = Server.CreateObject("ADODB.Command")
    Comm.connectiontimeout = 60
        comm.ActiveConnection = "dsn=telus_iasdb;uid=reports;pwd=reports;"
        comm.commandtype=4   
    
        comm.commandtext = "log_hits"
    
    
        set param = comm.createparameter("InPut",200,1,500,querystr)
    '    set param = comm.Parameters
    '    param.append comm.createparameter(querystr,200,1)
    
    comm.parameters.append param
    
        'Pass the input value
    '    comm("InPut") = querystr
    
    
        comm.execute()
    
    
    
    response.redirect(querystr)
    
    %>
    I believe my DSN is okay, but I do not have Excel etc. to verify. Any help on that would be appreciated also. I have turned on DSN tracing but I never see any data.

    Sorry for my ignorance, appreciate the help.
    NOTE: Please disregard the label "Senior Member".

  2. #2
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467
    Okay. I see I broke the first rule. I didn't ask for what I wanted. My question is "Is the way I am trying to test a valid method" (no pun intended). Do I need to do something else to actually test my asp script? Of course if someone sees an error that would be helpful also.
    NOTE: Please disregard the label "Senior Member".

  3. #3
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    To test it you probably want to remove the redirection at the bottom and response.write some values out, such as your querystr value and then try calling your stored proc with that exact value....

  4. #4
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467
    Thanks for you reply. I found some code that would display the error I was having. I then was able to fix the issue.
    NOTE: Please disregard the label "Senior Member".

Posting Permissions

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