[Parameter 'xxxxxx' not found] with TUniStoredProc

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ephillipe
Posts: 19
Joined: Tue 11 Aug 2009 14:54
Location: Teresópolis, Brazil

[Parameter 'xxxxxx' not found] with TUniStoredProc

Post by ephillipe » Wed 05 May 2010 13:25

Hi, I am migrating my database of SQL2005 for SQL2008. When I try execute the same SP in 2008 database I get this error: [Parameter 'xxxxxx' not found].


My code:

Code: Select all

LStoredProc := TUniStoredProc.Create(Self);
LStoredProc.Connection := RetonarConexaoPadrao();
LStoredProc.StoredProcName := '[dbo].[sp_retornarOperadorPorLogin]';
LStoredProc.LockMode := lmNone;
LStoredProc.ParamCheck := True;
LStoredProc.Prepare;
LStoredProc.ParamByName('Login').AsString := Login;
LStoredProc.ExecProc;
My SP:

Code: Select all

ALTER PROCEDURE [dbo].[sp_retornarOperadorPorLogin] 
	-- Add the parameters for the stored procedure here
	@Login varchar(100)
AS

ephillipe
Posts: 19
Joined: Tue 11 Aug 2009 14:54
Location: Teresópolis, Brazil

Post by ephillipe » Wed 05 May 2010 13:32

Additional Info:
SQL Server 2008 R2
SQL Server version: 10.50.1600

Same database restored in new server.

ephillipe
Posts: 19
Joined: Tue 11 Aug 2009 14:54
Location: Teresópolis, Brazil

Post by ephillipe » Wed 05 May 2010 13:51

I found the problem. :roll:

The problem is USER permission. But, I found this only when I change the component of execution.

I change TUniStoredProc for TUniQuery. When I execute with query component, the error is more clear. If I execute a SP component, the error is masked.

Sds.

Post Reply