Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Scenario:
When we do a text/file search in Windows system, the result is displayed one by one, based on the items found. i.e. as soon as the file matches with the search pattern, the result is displayed.

Problem:
Is there any way of achieving the similar kind of functionality for the Client-Server system, where the end-user sends a request to server for searching some data, which are stored across various database tables?

Does any database provides Windows like facility of returning partial resultset back to the client, and continues searching?

Thanks & Regards,
Niral Soni
Posted

1 solution

They pretty much all support this functionality. What you are looking for to achieve this is a cursor, which iterates over the results one by one and returns this back to be manipulated. While you can do this, it's generally discouraged because databases work best on sets of data.
 
Share this answer
 
Comments
Niral Soni 7-Sep-11 12:18pm    
My understanding of the CURSOR is that it will store the WHOLE result of the query, thereby releases the occupied resources, and the result can be processed separately.

So, if that is correct then my problem area still remains the same. Because, I was thinking of a way to display the record as soon as it matches the search pattern.

May be my thinking is wrong as the Windows Search works on the file system, while database follows the ACID properties. And hence one can not add a kind of HOOK in the database search and return the partial result.

Thanks & Regards,
Niral soni

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900