S
Shaun Stuart
I've got a webpage that calls some stored procedures with input variables.
The procedures return recordsets and also some output variables. We're
trying to get the values of the output variables. I've done this using the
method I found in MSDN, as shown in the code below. The problem is that we
believe doing it this way involves the use of the Microsoft Transaction
Server (IIS transaction server). Is this true? (The SQL Server and IIS
Server are on different machines and, I believe, a firewall separates them.)
I can't see why this method would use MTS. The problem is that in the past,
we have had problems with MTS stopping for no reason, which causes the
websites to not work. So my boss doesn't want to use any ASP code that
relies on MTS. Not using the stored procedure output variables makes things
way more complicated. So does this code really invoke MTS? And if it does,
is there a way to obtain SP output variables without using MTS?
I am running SQL Server 7.0 with the latest service pack and IIS version 4.
We do have an IIS version 5 server we can use if that matters.
Thanks,
Shaun
Set oCmd = Server.CreateObject("ADODB.Command")
oCmd.ActiveConnection = Application("onacctEpi_ConnectionString")
oCmd.CommandText = "CPREP_GetRegion"
oCmd.CommandType = adCmdStoredProc
oCmd.Parameters.Append
oCmd.CreateParameter("@location",adVarChar,adParamInput,8,locationchoice)
oCmd.Parameters.Append
oCmd.CreateParameter("@method",adVarChar,adParamInput,8,frtchoicecode)
oCmd.Parameters.Append
oCmd.CreateParameter("@zip",adVarChar,adParamInput,40,zipcode)
oCmd.Parameters.Append
oCmd.CreateParameter("@region",adVarChar,adParamOutput,8,0)
oCmd.Parameters.Append
oCmd.CreateParameter("@rtn_code",adInteger,adParamOutput,,0)
oCmd.Parameters.Append
oCmd.CreateParameter("@rtn_msg",adVarChar,adParamOutput,75,0)
oCmd.Execute, ,adExecuteNoRecords
region = oCmd.Parameters("@region")
rtn_code = oCmd.Parameters("@rtn_code")
rtn_msg = oCmd.Parameters("@rtn_msg")
The procedures return recordsets and also some output variables. We're
trying to get the values of the output variables. I've done this using the
method I found in MSDN, as shown in the code below. The problem is that we
believe doing it this way involves the use of the Microsoft Transaction
Server (IIS transaction server). Is this true? (The SQL Server and IIS
Server are on different machines and, I believe, a firewall separates them.)
I can't see why this method would use MTS. The problem is that in the past,
we have had problems with MTS stopping for no reason, which causes the
websites to not work. So my boss doesn't want to use any ASP code that
relies on MTS. Not using the stored procedure output variables makes things
way more complicated. So does this code really invoke MTS? And if it does,
is there a way to obtain SP output variables without using MTS?
I am running SQL Server 7.0 with the latest service pack and IIS version 4.
We do have an IIS version 5 server we can use if that matters.
Thanks,
Shaun
Set oCmd = Server.CreateObject("ADODB.Command")
oCmd.ActiveConnection = Application("onacctEpi_ConnectionString")
oCmd.CommandText = "CPREP_GetRegion"
oCmd.CommandType = adCmdStoredProc
oCmd.Parameters.Append
oCmd.CreateParameter("@location",adVarChar,adParamInput,8,locationchoice)
oCmd.Parameters.Append
oCmd.CreateParameter("@method",adVarChar,adParamInput,8,frtchoicecode)
oCmd.Parameters.Append
oCmd.CreateParameter("@zip",adVarChar,adParamInput,40,zipcode)
oCmd.Parameters.Append
oCmd.CreateParameter("@region",adVarChar,adParamOutput,8,0)
oCmd.Parameters.Append
oCmd.CreateParameter("@rtn_code",adInteger,adParamOutput,,0)
oCmd.Parameters.Append
oCmd.CreateParameter("@rtn_msg",adVarChar,adParamOutput,75,0)
oCmd.Execute, ,adExecuteNoRecords
region = oCmd.Parameters("@region")
rtn_code = oCmd.Parameters("@rtn_code")
rtn_msg = oCmd.Parameters("@rtn_msg")