Stored Procedure, Parameters.Add and Delphi Syntax
From: Bill N (billnielsen_at_hotmail.com)
Date: 04/29/04
- Next message: Vitali Kalinin: "Re: Stored Procedure, Parameters.Add and Delphi Syntax"
- Previous message: Kurt Callebaut: "TADOQUERY update"
- Next in thread: Vitali Kalinin: "Re: Stored Procedure, Parameters.Add and Delphi Syntax"
- Reply: Vitali Kalinin: "Re: Stored Procedure, Parameters.Add and Delphi Syntax"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Apr 2004 12:10:14 -0400
I get the following error 'Undeclared identifier: 'DataType'' . My syntax
seems correct but I think it is something to do with the nested 'With'
statement but I can't figure out why?
=============================================
Cmd := TADOCommand.Create(Self);
with Cmd do
begin
CommandText := 'SP_RETURN_NUM_LKUPS;1';
CommandType := cmdStoredProc;
Connection := FCnn;
with Parameters.Add do begin
Name := '@RETURN_VALUE';
DataType := ftInteger;
Direction := pdReturnValue;
Precision := 10;
end;
with Parameters.Add do begin
Name := '@TableID';
DataType := ftInteger;
Precision := 10;
Value:=1;
end;
with Parameters.Add do begin
Name := '@Result';
DataType := ftInteger;
Direction := pdInputOutput;
Precision := 10;
end;
Execute;
Result:=Parameters[2].Value;
end;
end;
=============================================
One other quick questions:
1) How do I check the Return_Value? Parameters[0].Value? What values
indicate success or failure?
Thanks,
Bill N
- Next message: Vitali Kalinin: "Re: Stored Procedure, Parameters.Add and Delphi Syntax"
- Previous message: Kurt Callebaut: "TADOQUERY update"
- Next in thread: Vitali Kalinin: "Re: Stored Procedure, Parameters.Add and Delphi Syntax"
- Reply: Vitali Kalinin: "Re: Stored Procedure, Parameters.Add and Delphi Syntax"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|