Re: Recordset in Memory

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Tranactions are a way to make a series of data operations
atomic. I.e. they are all committed or, if something
prevents one operation from running successfully, then you
can roll all of them back so none of them actually are
stored in any table.

Read up on BeginTrans, CommitTrans and Rollback in Help,
then, if there's something you need further assistance with,
post a specific question to a new thread.
--
Marsh
MVP [MS Access]


Michael wrote:
>Thanks. I've never used the Transaction functionality but sounds like it
>would work for me. What is the basic concept behind it so I can understand
>what I'm reading about in the Help.
>
>
>"Marshall Barton" wrote:
>> I wouldn't go so far as to say "no way", but you are asking
>> for a very specific way to accomplish something when there
>> are other ways to get the job done.
>>
>> Using a temporary database is a simple, easy to implement
>> way that I would use in this kind of situation.
>>
>> If you were using ADO, then a disconnected recordset would
>> be almost exactly what you're looking for.
>>
>> DAO doesn't have disconnected recordsets, but, you could
>> start a transaction, create a table, manipulate its data,
>> and then, when you're done with it, use Rollback to throw it
>> away.
>>
>>
>> Michael wrote:
>> >So, I gather, there is no way to accomplish what I want. Is that correct?
>> >
>> >
>> >"Douglas J. Steele" wrote:
>> >> Consider putting your temporary tables in a temporary database.
>> >>
>> >> Tony Toews shows one way of doing this at
>> >> http://www.granite.ab.ca/access/temptables.htm
>> >>
>> >>
>> >> "Michael" <Michael@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
>> >> > Since I run these procedures on a regular basis, I just have temporary
>> >> > tables
>> >> > set up for this purpose and delete all the records each time I need to,
>> >> > but
>> >> > the database gets bloated. For example, my .mdb file is usually 11MB, but
>> >> > after running this process once, it grew to 123MB - eventhough all the
>> >> > temporary records had been deleted. I have to compact the .mdb each time
>> >> > to
>> >> > get it back to it's normal 11MB size.
>> >> >
>> >> > I was just wondering if there's a way to populate a recordset in memory,
>> >> > use
>> >> > it, and then remove it from memory when done without having to store it to
>> >> > a
>> >> > table first. I don't think an array would work because the number of
>> >> > records
>> >> > I need for the temporary recordset is different each time.
>>

.