L
Light
Hi all,
I posted this question in the sqlserver.newusers group but I am not getting
any response there so I am going to try it on the fine folks here.
I inherited some legacy ASP codes in my office. The original code's backend
is using the SQL Server 2000 and I am testing to use it on the Express
edition.
And I run into the following problem.
One of the pages is using a stored procedure to create a new table and
return the value of the new table ID.
The codes are written in VBScript, briefly, it is as follows:
set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection= dbConnection
cmd.CommandText = "NewCompany"
cmd.CommandType = adCmdStoredProc
cmd.Parameters("@varCompanyName") = Request.Form("COMPANYNAME")
:
:
cmd.Parameters("@RETURNVALUE") = 0
Set rsID = cmdCom.Execute
Set rsID = rsID.NextRecordset
ID = cmdCom.Parameters("@RETURNVALUE")
On the SQL Server 2000, the ID is returned correctly, but the Express
doesn't. In fact, it didn't fill in the vat all. For example, If I set the
RETURNVALUE to -5 before the execute,
the new value remains -5. And I could see the table is created correctly
with the proper id. It is just the return value received at the client web
browser is never set.
So my question is, is there any change I need to make for the Express's
stored procedure?
Any suggestion is highly appreciated. This problem is kind of important as a
lot of our customers are migrating their SQL servers from 2000 to the 2005.
TIA
I posted this question in the sqlserver.newusers group but I am not getting
any response there so I am going to try it on the fine folks here.
I inherited some legacy ASP codes in my office. The original code's backend
is using the SQL Server 2000 and I am testing to use it on the Express
edition.
And I run into the following problem.
One of the pages is using a stored procedure to create a new table and
return the value of the new table ID.
The codes are written in VBScript, briefly, it is as follows:
set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection= dbConnection
cmd.CommandText = "NewCompany"
cmd.CommandType = adCmdStoredProc
cmd.Parameters("@varCompanyName") = Request.Form("COMPANYNAME")
:
:
cmd.Parameters("@RETURNVALUE") = 0
Set rsID = cmdCom.Execute
Set rsID = rsID.NextRecordset
ID = cmdCom.Parameters("@RETURNVALUE")
On the SQL Server 2000, the ID is returned correctly, but the Express
doesn't. In fact, it didn't fill in the vat all. For example, If I set the
RETURNVALUE to -5 before the execute,
the new value remains -5. And I could see the table is created correctly
with the proper id. It is just the return value received at the client web
browser is never set.
So my question is, is there any change I need to make for the Express's
stored procedure?
Any suggestion is highly appreciated. This problem is kind of important as a
lot of our customers are migrating their SQL servers from 2000 to the 2005.
TIA