Receiving COM return parameter value in ASP.Net not working

From: markeboy (top.gun_at_airforce.nz)
Date: 04/29/04


Date: Thu, 29 Apr 2004 15:26:04 -0700

We are upgrading ASP application to ASP.Net

Previously, we were able to populate an output paramenter for a Sql server 2000 stored procedure, execute the command, and the query the parameter object for its new value (it was being updated by the stored procedure).

I can confirm, through tracing that the return parameter is being updated by SQL, however, the updated value is NOT bubbling back up to the Parameter object. Yes, the stored procedure is declaring the parameter as "OUTPUT"

My code for creating and populating the parameter is:

prmLastUpdated = cmm.CreateParameter("LastUpdated",adDBDate, adParamInputOutput);
cmm.Parameters.Append(prmLastUpdated);
prmLastUpdated.Value = dtLastUpdated;

and the code for looking back at it after the Execute() has been issued is:

dtLastUpdated = cmm.Parameters.Item(idxTimestamp).Value;

It appears the move to the ASP.Net engine (and JScript.Net from javascript) has stopped this happenning. Can anyone shed any light please



Relevant Pages

  • Re: Problem with the Legacy ASP files and the Sql Server Express
    ... It looks like it is not going to be an easy job getting it to work on the SQL Server 2005 and Express:(. ... 'Then you can execute the command and then retrieve the ID ... I am 100% sure this code works against any version of SQL Server, as long as the connection is OK and the SP has two parameters @varCompany as Input and @Return_Value as Output. ... I do not think your problem is due to difference of SQL Server2000 and SQL Server2005, unless your stored procedure has some thing that only works in SQL Server2000, not SQL Server 2005. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Stored Procedure Security/Permissions
    ... Cross-Database Ownership Chaining Behavior Changes in SQL Server 2000 ... > permission to read either table; ... > permission to execute the stored procedure, ...
    (microsoft.public.sqlserver.security)
  • Connection.Execute and SQL stored procedures
    ... ..asp, the connection object and MS SQL Server as the DB can help me out. ... Five of the six calls execute as expected. ... This particular stored procedure does quite a bit of work within the DB, ...
    (microsoft.public.sqlserver.odbc)
  • Re: ADO.NET Timout
    ... That in turn execute SP ... BeginExecute method of the Command object. ... How can I call a stored procedure to do its thing asynchronously. ... see "Explicit Transactions" in SQL Server Books ...
    (microsoft.public.dotnet.framework.adonet)
  • Syntax Error in Line 1 of Stored Procedure
    ... I have a Windows Form application that is calling a stored procedure to ... insert a record into a SQL Server 2000 database table. ... I can execute the procedure without difficulty in SQL ...
    (microsoft.public.dotnet.framework.adonet)