tags:

views:

60

answers:

1

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)
A: 

It seems to me that the sproc has changed and returns a scalar instead of a result set.

Changing CommandType = 1 (adCmdText) is need to match with your query changed to SELECT 'whateveryouwannatry' AS [updated].

Since you stated that nothing in the asp code changed we can rule out that the return type of your command/sproc was altered by specifying an output parameter.

Filburt
No change to spocs either. Sometime last week i changed a config setting on an different site but this site has been running unmodified for - literally - years.
justSteve