Recordset Experts...SQL statement on an open recordset? 
Author Message
 Recordset Experts...SQL statement on an open recordset?

Is there a method of running a full SQL statement against an open recordset
to produce a subset of fields in a 2nd recordset? Filtering the open
recordset is too limited for what I have in mind, and I'd rather not requery
the database, since I have all of the info in the current recordset...if I
have a current recordset of 6 fields, what I'd like to do is something like:

    SELECT field1, field2, field3 FROM current_recordset WHERE field1 =
some_value

(filtering will mimic the WHERE clause, but not the SELECT statement, thus
not producing a subset of fields)

Kit



Mon, 19 Jan 2004 01:43:55 GMT  
 Recordset Experts...SQL statement on an open recordset?

Quote:

> Is there a method of running a full SQL statement against an open recordset
> to produce a subset of fields in a 2nd recordset? Filtering the open
> recordset is too limited for what I have in mind, and I'd rather not requery
> the database, since I have all of the info in the current recordset...if I
> have a current recordset of 6 fields, what I'd like to do is something like:

>     SELECT field1, field2, field3 FROM current_recordset WHERE field1 =
> some_value

DAO.Recordset has a Filter property.  Perhaps ADO has an equivalent, if
you're using MDAC/OLEDB?

--

WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Wed, 21 Jan 2004 00:33:40 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Opening recordsets(OpenRecordset vs. Recordset.Open)

2. MDAC 2.6 has broken my recordset open statement in VBScript

3. Change recordsets in SQL statement

4. Opened Recordsets don't show up in Recordsets Collection

5. errors different when executing SQL statements via recordset or connection object

6. getting sql statement out of recordset object

7. ADO Recordset and SQL Statement and Access 2000

8. Using recordset in sql statement

9. Are SQL statements faster than using recordsets?

10. Open ADO recordset on another ADO recordset - possible?

11. SQL statement that searches for recordset for inquery in .dbf

12. Run SQL Statement Against Disconnected ADO Recordset

 

 
Powered by phpBB® Forum Software