Re: Dynamic Lists in Forms4.5

From: Arnold Schommer <arnold.schommer_at_io-computer.de>
Date: 1998/03/10
Message-ID: <350534A3.FC1FBCB7_at_io-computer.de>#1/1


nilesh_at_cheerful.com wrote:
>
> hello,
>
> I am trying to populate a list at runtime.
> This is what the table is
>
> SQL> select * from cities;
>
> CITY_ID CITY_NAME
> --------- ------------------------------
> 1 BOMBAY
> 2 PUNE
> 3 DUBAI
> 4 BANGALORE
> 5 JODHPUR
>
> In the form I have a emp_master_clock corresponding to the
> emp_master_table
> in the database.
>
> There is a list box which give the city values and which I want to
> populate.
> I have written a when-new-bock-instance trigger:
>
> DECLARE
> group_id RecordGroup:= Find_group('city_names');
> it_id Item := Find_Item('city_list');
> status NUMBER;
> sqlstmt varhcar2(200);
>
> BEGIN
>
> sqlstmt := 'Select city_id id, city_name value from cities';
>
> if (Id_Null(group_id)) then
> group_id := Create_Group_From_Query('city_names',sqlstmt);
> status := Populate_Group('city_names');
> Populate_List(it_id,'city_names');
> else
> Populate_List(it_id,'city_names');
> end if;
>
> END;
>
> I cant populate the group. Error FRM 41072 Cant Populate city_names
> And this is what help says :
>
> FRM-41072: Cannot create Group <record group name>.
> Cause: Caused by one of the following
> 1. Duplicate column names in SQL statement.
> 2. Invalid record group name.
> 3. Query is invalid.
> Action: Check the group name and/or correct the SQL statement.
> Level: 20
> Type: Error
>
> It cant be 1, there are no duplicate columns in the query.
> It could be 2, but why would the record group be invalid?
> It cant be 3, the query is valid.
>
> What should I do?
>
> Thankx,
>
> Nilesh Porwal,
> nilesh_at_cheerful.com
>
> -----== Posted via Deja News, The Leader in Internet Discussion
> ==-----
> http://www.dejanews.com/ Now offering spam-free web-based
> newsreading

I think i had the same problem.
Try to convert all non-char-columns to char first: (in your example)

        Select TO_CHAR(city_id) id, city_name value from cities should solve it. Received on Tue Mar 10 1998 - 00:00:00 CET

Original text of this message