TADOStoredproc



Hi all,

I'm just starting to use the ADO components and have a problem with the
TADOStoredproc.

I'm tying to execute a stord proc on an SQL2003 server.

In design mode, I can list all stored procedures in the ProcedureName
property and I can retreive all the parameters of the selected stored
procedure also.

When I want to execute the stored procedure , I always get the error :
'Cannot find stored procedure', allthough it has been retreived at design
time.

What am I doing wrong here ?

procedure TForm1.Button1Click(Sender: TObject);
begin
Conn.Open; //ADOConnection

SP1.ProcedureName:='Stp_Get_NewSession';
SP1.Parameters.Refresh;
SP1.Parameters.ParamByName('@Username').Value:= 'DUhj';
SP1.Parameters.ParamByName('@Password').Value:= '1234';
SP1.ExecProc;

end;

I'm using D7.1 and have admin rights on the server.

TIA

Paul





.


Quantcast