I'm working with ADO via the 2.6 Type Library that I imported into Delphi, 
and have the following code to call a stored proc, but its not working :( 
It returns with "Procedure 'tp_next_tdcontrol' expects parameter '@entity', 
which was not supplied", does anyone know what I'm doing wrong?

var
  Cmd: _Command;
  Rs: _RecordSet;
  ra: OleVariant;
begin
  Cmd := CoCommand.Create;
  Cmd.Set_ActiveConnection(Conn);
  Cmd.CommandText := 'tp_next_tdcontrol';
  Cmd.Parameters.Append(Cmd.CreateParameter('@entity', adVarChar,
    adParamInput, 40, 'Worktrans'));
  Cmd.Parameters.Append(Cmd.CreateParameter('@next_ref', adInteger,
    adParamOutput, -1, 0));
  Cmd.Execute(ra, EmptyParam, adExecuteNoRecords);
  Result := Cmd.Parameters.Item['@next_ref'].Value;
end;

-- 
Vi de udødelige inviterer dere til å slå dere sammen med oss

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to