Board index » delphi » MS SQL Server2000 compatibility

MS SQL Server2000 compatibility

Hi!
I have this problem: My application is using ADO with MS SQL Server7. I'm
using some stored procedures and checking for return values in parameter
"RETURN_VALUE" as follows:

---
MyStoreProcedure->ExecProc();
int result =
MyStoreProcedure->Parameters->ParamByName("RETURN_VALUE")->Value;
if (Result != 0) {
   /*error occured*/

Quote
}

---

All is working OK.
If I want to upgrade to MS SQL Server2000, the same code raises exception
with message "MyStoreProcedure: Parameter 'RETURN_VALUE' not found. Where is
the problem?
Thanks.
--
Ing. Miloslav Peterka
programmer
ELSYST Engineering
http://www.el-soft.cz

 

Re:MS SQL Server2000 compatibility


Quote
MP <mpete...@quick.cz> wrote in message news:3b6183b4_1@dnews...
> I have this problem: My application is using ADO with MS SQL Server7. I'm
> using some stored procedures and checking for return values in parameter
> "RETURN_VALUE"

> If I want to upgrade to MS SQL Server2000, the same code raises exception
> with message "MyStoreProcedure: Parameter 'RETURN_VALUE' not found. Where
is
> the problem?

See http://support.microsoft.com/support/kb/articles/Q285/2/95.ASP

SQL Server 2000 changes RETURN_VALUE to @RETURN_VALUE

Regards,
Andy Mackie.

Other Threads