Can you give a clearer explanation of "trouble"?
Are you getting an error or the wrong results?
Is the block a base table block (associated with a table in it's property pallette)?
Querying a block involves using
Code:
execute_query
, not SQL. Are you trying to populate the rows or add data to existing rows?
[sup]Beware of false knowledge; it is more dangerous than ignorance.[/sup][sup] ~George Bernard Shaw[/sup]
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
the problem is that i want the results to be shown on some button click.
the second thing is that i want the form to search for the value using the wild cards (%) instead of matching the whole key word then searching.
now the problem is that this query works well when the query results only one record. but in the case when there are multiple records in the query result. forms raise unhandeled exception error.
I really dont understand your problem. Why cant you put execute_query on a button click, and copy the wildcard values into base table items in a pre-query? Or alter the default WHERE clause on the block?
sorry dear but i've tried it putting in the default where clause of the block.i've written it like this in the where clause.
:con.con_no like '%'||:con.con_no||'%'
and when i enter the substring i get , the query caused no results message.
can u plz give me some example which can solve the problems like this. or tell me how to copy the values into pre-query trigger , shall i write the whole sql statement or just the where clause.
[sup]Beware of false knowledge; it is more dangerous than ignorance.[/sup][sup] ~George Bernard Shaw[/sup]
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
I think you need to familiarize yourself with Forms basic concepts, especially with the concept of base-table block, query-by-example and processing flowcharts. I think that you try to use an intelligent device like a hammer
Your condition
:con.con_no like '%'||:con.con_no||'%'
makes about no sence, because you're trying to compare forms item value with the same forms item value. This condition does not involve any database-related information. I'm sure you need something other.
hi dear frends , many cardial thanks to all of you for ur responses.
as for the 'STUDENTS' is concerned, i used it for an example to put this question at this forum.
CON is my original table having the attributes
CON_NO (of type varchar),CON_DATE (of type date),
CON_QTY ( Number) etc. of which i'm trying to match the CON_NO's having the same substring.
the query works well where query results only one record but where the query is expected to result more than one records.
i get no error but just
"query caused no records." message
Can you explain exactly how you have set up your block. What have you specified for the 'Database Data Block', 'Query Data Source Type' and 'Query Data Source Name' properties?
Bilalch, I'd suggest you to start a new thread because the information you provide is contradictory: you used STUDENS table as an example, now it's CON; you stated that unhandled exception was raised, but now you have no errors. So where is truth? You make everything possible to obscure your problem.
i think the problem is some where in the use of where clause.plz suggest what to write in the where clause property of the block so that the user dont have to put the '%' sign in the text item for searching.
the values u asked are as under.
Database Data Block YES
Query Data Source Type TABLE
Query Data Source Name CON
* and DIMA hope i'll have to follow ur suggestion.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.