Stored Procedure, Parameters.Add and Delphi Syntax

From: Bill N (billnielsen_at_hotmail.com)
Date: 04/29/04


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



Relevant Pages

  • Re: Combined Abbreviated contidionts (was: PIC P put to real use
    ... I sent Bill some questionable syntax off-list some time ago. ... I continue to use abbreviated conditions, and I continue to get bit by ... Anyway, no, I don't expect COBOL to change this at this stage. ...
    (comp.lang.cobol)
  • Re: Thats all syntax
    ... >>1) assuming that new returns a null pointer upon failure. ... > That's syntax. ... >>3) advocating inheritance when templates would be more appropriate. ... generally work for a data structures and algorighms class. ...
    (comp.lang.cpp)
  • RE: Lost TOTAL Icon
    ... I don't want the syntax in the cell, I want the total, and only the total is ... "Bill" wrote: ... right click your tool bar and from the pop up, click customize. ...
    (microsoft.public.excel.misc)
  • Re: search/replace on multiple files?
    ... Great pick-up, Bill :-) ... Given the complexity of the syntax and the fact that I have to look it all ... up every time I use it, I tend to record the syntax into a VBA Macro every ... but they only work with ascii files. ...
    (microsoft.public.mac.office.word)
  • Re: AllScreen
    ... syntax well, ... int num_screens; ... I am trying to get the number of screens and its resolution in windows. ...
    (microsoft.public.dotnet.framework.windowsforms)