Re: Problem in Get_Block_property(blk_id, ORDER_BY)
Date: 1997/12/03
Message-ID: <881164267.29105_at_dejanews.com>#1/1
In article <3484EB2B.35D1E765_at_cadvision.com>,
Quang Vu <vuq_at_cadvision.com> wrote:
>
> I want to change the sort order programmatically by using built-in
> commands:
> GET_BLOCK_PROPERTY(blk_id, ORDER_BY)
> SET_BLOCK_PROPERTY(blk_id, ORDER_BY, ' customer_id');
>
> When I run the program to the point that it executes the
> GET_BLOCK_PROPERTY command, I get the FRM error message:
> FRM-40738:Argument 2 to builtin GET_BLOCK_PROPERTY cannot be null.
>
> I did try to replace ORDER_BY with any other constant parameter allowed
> such as DEFAULT_WHERE, FIRST_ITEM etc.. It works fine.
>
> I can even compile the SET_BLOCK_PROPERTY(blk_id, ORDER_BY, '
> customer_id'). It gives me "too many declarations for
> SET_BLOCK_PROPERTY" error message. I did try this command with
> DEFAULT_WHERE and it works perfectly OK
>
> My small test procedure look like this:
>
> DECLARE
> order_by VARCHAR2(200); <---ERROR???
> blk_id Block;
>
> BEGIN
> blk_id := Find_Block('ORD');
> order_by := get_block_property( blk_id, ORDER_BY);
> set_block_property(blk_id, ORDER_BY,' customer_id ');
> GO_BLOCK('ORD');
> EXECUTE_QUERY;
> END;
>
> Is there anything I have done wrong or it is a bug in developer/2000.
>
> Thanks for your help in advanced
>
> Quang Vu
I don't think you can have a local variable with the same name as the parameter you need to send with the Get_Block_Property call. Change the name of the "order_by" variable to a different name.
Steve Cosner
http://members.aol.com/stevec5088 -- The QA utility form has recently been upgraded. It's also available for Macintosh and Unix Forms.
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Wed Dec 03 1997 - 00:00:00 CET