Re: Forms 4.5 problem, pl. help!!!

From: <dmoyer_at_gpu.com>
Date: 1996/06/21
Message-ID: <4qe6cn$31o_at_nn2.fast.net>#1/1


In <4qdal4$5b6_at_newsbf02.news.aol.com>, nvedula_at_aol.com (NVedula) writes:
>Hi,
>
>Thanx in advance!!
>I have 2 blocks, subject (base table block) and test ( a control block).
>i am working on the where clause of the subject block. The subject block
>has 2 cols: subject_name and subject_id. usually if i do not specify a
>where clause in the properties window of the subject block, i get all
>records when i execute a query. however, what i would like to do is put
>in a where clause such that
>
> subject_id = :test.sub (sub can be a display item or text item in the
>control block, test).
>
> in other words i am basically referencing value of an item in another
>block (it could be control block or base table block). also, i did put in
>a value in the default value property of the "sub" item.
>
>my question is why am i not being able to retreive any records. i get an
>error frm 40350: forms cannot do query.
>
>
>*****Here is an example too to explain better my situation:******
>
>Subject block is like this:
>
>subject_id subject_name
>10 physics
>20 chemistry
>
>The control block "test" has one item only and it is "sub". i put in a
>default value of 20 in its property window.
>
>Now, without a where clause, i get both records. however, lets say i want
>only the 20.
>so i put in a where clause and state
>WHERE subject_id = :test.sub -- i am referencing an item in a block;
>
>so, the query should be executed like this right?
>WHERE subject_id = 20;
>
>well it does not work. i need to do this cause i will learn referncing
>items in other blocks etc.
>
>i think i am not storing the value 20 in the sub item properly! but,
>where do i store it?
>
>please help!
>
>thank you for your time!!
In the where clause item of the subject block don't put the word WHERE, just list the conditions.

D. Scott Moyer, Jr.                        dmoyer_at_gpu.com (preferred for work)
GPU Service Corporation                dsmoyer_at_enter.net (preferred for home)
Reading, PA Received on Fri Jun 21 1996 - 00:00:00 CEST

Original text of this message