Home » Developer & Programmer » Forms » how to make a simple search engine???
icon5.gif  how to make a simple search engine??? [message #191171] Tue, 05 September 2006 01:53 Go to next message
raizen_underground
Messages: 28
Registered: September 2006
Location: Manila, Phillipines
Junior Member
hello experts,

please help me create a simple search engine for my project in oracle. the requirement needs to have a textfield that henever i type something it will sort the block and highlithened the data that has the same letter or number with the textfield...is it possible to make a search engine like this??

tnx guys!!!!

[Updated on: Sun, 10 September 2006 21:14] by Moderator

Report message to a moderator

Re: how to make a simple search engine??? [message #192085 is a reply to message #191171] Sun, 10 September 2006 21:13 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
First - please do NOT press 'enter' at the end of each line. The forum sdoftware DOES know how to 'wrap text'.

Create a form, create a block and use the wizard to access a table in your database (you DO have to be signed in to a database for this to work), in the 'sort by' property add the name of the field(s) you wish to 'sort by', create another block (let's call it 'ctrl', it does NOT access a database table), add one item manually (call it 'srch_txt'), put this field on the canvas on which you placed the database populated block.

Now, using the form builder, move the 'ctrl' block higher up the hierarchy so that it is now the first block. Add a button to the 'ctrl' block and put it next to the 'srch_txt' field. Add a When-Button-Pressed trigger to this button. Put code into this trigger to go to the second block and perform an 'Execute_Query' command.

On your data block add a Post-Query trigger which tests the returned value against the data in 'srch_txt' and if they 'match' use a 'set_item_instance_property' command to change their Visual Attribute name (you will need to have defined a couple of visual attributes, eg. 'normal' and 'highlight').

David

Upd-Mod: Many typos. Sorry.

[Updated on: Tue, 12 September 2006 20:49]

Report message to a moderator

Re: how to make a simple search engine??? [message #192160 is a reply to message #192085] Mon, 11 September 2006 05:34 Go to previous messageGo to next message
raizen_underground
Messages: 28
Registered: September 2006
Location: Manila, Phillipines
Junior Member
David,

tnx for the reply....ill will try ur suggestion....

tnx again....
Re: how to make a simple search engine??? [message #192164 is a reply to message #192085] Mon, 11 September 2006 05:48 Go to previous messageGo to next message
raizen_underground
Messages: 28
Registered: September 2006
Location: Manila, Phillipines
Junior Member


Just 1 question....how am i going to match the search field against the records store in the block...

tnx in advance....
Re: how to make a simple search engine??? [message #192561 is a reply to message #192164] Tue, 12 September 2006 20:52 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Where I said to use 'Execute_Query', I should have said 'Enter_Query', then assign 'srch_txt' to 'blk.txt', then 'execute_query'.

In the Post-Query trigger use an 'if' test between ':blk.txt' and ':ctrl.srch_txt' using the 'substr' function.

David
Re: how to make a simple search engine??? [message #192564 is a reply to message #192561] Tue, 12 September 2006 21:05 Go to previous messageGo to next message
raizen_underground
Messages: 28
Registered: September 2006
Location: Manila, Phillipines
Junior Member
david..

can u give me the exact code for this....tnx in advance...I desperately need this search txt to finish my thesis study....tnx....
Re: how to make a simple search engine??? [message #192636 is a reply to message #192564] Wed, 13 September 2006 02:26 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Starting from http://www.oracle.com/technology/products/forms/index.html

Depending on the version of Forms that you are using either go to 'Resources' (on the right hand side), then 'Sample Code'. For '9i' and '6i' go to the bottom of the page and follow the links.

David
Re: how to make a simple search engine??? [message #192654 is a reply to message #192636] Wed, 13 September 2006 02:59 Go to previous messageGo to next message
raizen_underground
Messages: 28
Registered: September 2006
Location: Manila, Phillipines
Junior Member
david,..

the sample code in the site that you have been suggested is not working......hope to hav a sample code soon....tnx in advance....


raizen....
Re: how to make a simple search engine??? [message #192838 is a reply to message #192654] Wed, 13 September 2006 18:02 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
In what way is

the sample code in the site that you have been suggested is not working

The site does not respond or you are using an educational institution's PC and they do not permit downloads by students?

David
Previous Topic: set_item_property problem...urgent plsss....
Next Topic: Update on database through forms compilation Error!
Goto Forum:
  


Current Time: Fri Dec 02 17:04:03 CST 2016

Total time taken to generate the page: 0.14461 seconds