Re: Newbie question

From: <rtproffitt_at_my-deja.com>
Date: Tue, 23 Nov 1999 16:28:31 GMT
Message-ID: <81efb7$3ar$1_at_nnrp1.deja.com>


Brian,
That depends on where the SQl statement is...

Referencing a field is easy, either by bind notation, or by the NAME_IN and COPY functions.

   Myblock

      MyField char 40
  :Myblock.MyField := 'bob';
  COPY('Bob','Myblock.Myfield');

Now, if the SQL is local to an event trigger within the form, simply reference the field   Select x,y,z
  Into a,b,c
  From MyTable
  Where TheColumn = :MyBlock.MyField;

It the SQL is in a Forms library, you must use the Name_In function, for indirect referencing.   Select x,y,z
  Into a,b,c
  From MyTable
  Where TheColumn = Name_In('MyBlock.MyField');

If the SQl is in a Stored Procedure then you must pass the parameter into the procedure

   MyProcedure(a,b,c,:Myblock.Myfield);

   Procedure MyProcedure(a type, b type, c type, vParm Type);    ...etc...
  Select x,y,z
  Into a,b,c
  From MyTable
  Where TheColumn = vParm;

Not at all difficult really...

Robert Proffitt

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Nov 23 1999 - 17:28:31 CET

Original text of this message