Reading return value from SQL Server

I am using NAV 3.7 to execute a stored procedure residing on sql server 2000.

When I tried to run the report, the error:

This message is for C/AL programmers:

An exception was raised in method Append. The OLE control or Automation server has returned error (HRESULT) -2147352567. The component did not provide the exception description.

lADOParameter:=lADOCommand.CreateParameter(’@TemplateID’, 200, 1, 20, vTemplateid);

lADOCommand.Parameters.Append(lADOParameter); ← Error occurs here

Appreciate it if someone could help.