Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending recordsets into a recodset

Status
Not open for further replies.

yahve

Programmer
Nov 14, 2000
159
CA
Hi,

I'm coding a custom search engine, and I want to use recordset paging. In order to be able to search with multiple key words, I'm using a FOR loop to iterate thru an array which contains the key words. Each time, I write a SQL query with one word and write the results out to the page. This works great, until I try to page thru the results. All examples of paging I've seen work with one recordset, I'm working with many (as many as I have keys words).

I was thinking of sending each recordset to a single recordset (appending as I go along, instead of writing to the page) so that I get a single recodset that contains all my recodsets, so that I could page thru this one recodset. How is this done?

Any other suggestions as how I could do this would be welcomed and appreciated.

Thanks.
 
Well, assuming all the data was compatible (the columns of each are the same datatype), you might consider using a UNION query:

SELECT colA FROM tableA WHERE ....
UNION ALL
SELECT colA FROM tableB WHERE ....

So that the two queries come out already in a single recordset.

Additionally, doing a text search is made oh-so-easy with SQL Server's Full Text Indexing Service, which utilizes the Microsoft Search Service. It's extremely powerful and very easy to use, not to mention very fast, as well.

If you have SQL Server, I would highly recommend it. It doesn't install by default w/ SQL Server, but it's on every disk. You just have to add it to the installation.

good luck! :)
paul
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top