ASP Classic page quit working

Posted by justSteve on Stack Overflow See other posts from Stack Overflow or by justSteve
Published on 2010-04-19T18:31:47Z Indexed on 2010/04/19 18:33 UTC
Read the original article Hit count: 648

Filed under:

I've had a set of legacy pages running on my IIS7 server for at least a year. Sometime last week something changed and now this line:

Response.Write CStr(myRS(0).name) & "=" & Cstr(myRS(0).value)

which used to return nothing more exciting than the string: 'Updated=true' (the sproc processing input params, stores them to a table, checks for errors and when that's all done returns a success code by executing this statement: select 'true' as [Updated]

Now my pageside error handler is being involved and offers:

myError=Error from /logQuizScore.asp
Error source: Microsoft VBScript runtime error
Error number: 13
Error description: Type mismatch

Important to note that all lots of pages use the same framework - same db, same coding format, connecitonstrings and (so far as I can tell) all others are working.

Troubleshot to this point:

The call to the stored procedure is working correctly (stuff is stored to the given table). The output from the stored procedure is working correctly (i can execute a direct call with the given parameters and stuff works. I can see profiler calling and passing. I can replace all code with 'select 'true' as updated' and the error is the same.

everything up to the response.write statement above is correct.

So something changed how ADO renders that particular recordset.

So i try: Response.Write myRS.Item.count

and get:

Error number: 424 Error description: Object required

The recordset object seems not to be instantiating but the command object _did execute. Repeat - lots of other pages just the same basic logic to hit other sprocs without a problem.

full code snippet

set cmd1 = Server.CreateObject("ADODB.Command")
cmd1.ActiveConnection = MM_cnCompliance4_STRING
cmd1.CommandText = "dbo._usp_UserAnswers_INSERT"

... cmd1.CommandType = 4 cmd1.CommandTimeout = 0 cmd1.Prepared = true set myRS = cmd1.Execute

Response.Write CStr(myRS(0).name) & "=" & Cstr(myRS(0).value)

© Stack Overflow or respective owner

Related posts about asp-classic