DAO Connectionless Recordset?
- From: "darkforcesjedi" <andrew.mallner@xxxxxxxxxxx>
- Date: 17 Jul 2006 08:51:48 -0700
Creating a connectionless recordset in ADO is simple enough, but how do
you do it in DAO? I want a recordset stored in memory so I can
filter/sort it easily. If I create a table I can make it work, but I
don't want to have to read/write everything from/to disk every time I
need to use the data.
I tried:
Dim r As DAO.Recordset, tdf As DAO.TableDef
Set tdf = CurrentDb.CreateTableDef("tmp", dbHiddenObject)
With tdf.Fields
.Append tdf.CreateField("TypeID", dbLong)
.Append tdf.CreateField("Minor_ID", dbLong)
End With
'ERROR 3420 "Object invalid or no longer set"
Set r = tdf.OpenRecordset
r.AddNew
r.Fields("TypeID") = 1
r.Fields("Minor_ID") = 7
r.Update
r.Close
Set r = Nothing
Set tdf = Nothing
.
- Follow-Ups:
- Re: DAO Connectionless Recordset?
- From: David W. Fenton
- Re: DAO Connectionless Recordset?
- From: Lyle Fairfield
- Re: DAO Connectionless Recordset?
- Prev by Date: Re: Clearing multi-select list
- Next by Date: Filtering Records
- Previous by thread: Query With Not or <>
- Next by thread: Re: DAO Connectionless Recordset?
- Index(es):