Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Subqueries in ADO

I am new to ADO, and have found some great information searching around these forums. However I would appreciate some direct advice on a couple general questions (hope this is posted in the correct place):

1. What is the best way to implement compound queries using recordsets? For instance, if I have the recordsets rs1 and rs2, how would I achieve "select * from rs1 where symbol not in (select symbol from rs2)" ? Bear in mind that the underlying tables may be in separate databases, or may be free tables, or may be text or excel files, so storing queries in the database may not always be an option.

2. Is there a way to create an empty recordset, without using some dummy query to return an empty recordset which I can then modify? The fields.append and AddNew methods don't seem to work unless the recordset is open, and I can't open the recordset without a connection and a query.

Thanks in advance for any advice.
[959 byte] By [amotto] at [2007-11-11 10:21:36]