PC Review


Reply
Thread Tools Rate Thread

ADODB.Recordset save command creates local file!?

 
 
The Dude
Guest
Posts: n/a
 
      25th Sep 2008
Hello everyone,

I had a question regarding the use of an ADODB.Recordset variable.

When I add a new record to a table using it, it creates a local file at the
moment the code runs the .save command. The file is named exactly like the
table the Recordset was opened on, and is located in the MyDocuments folder.
The file remains even after '.close' or 'Set X = nothing' flush commands.

Note that it does not occur when using the .update command; which I now use.
Nevertheless, I was wondering why it would happen.

Thanks
T_D
 
Reply With Quote
 
 
 
 
Dirk Goldgar
Guest
Posts: n/a
 
      25th Sep 2008
"The Dude" <f_com2°AT°yahoo°DOT°fr> wrote in message
news:12EEDF26-3113-4C03-AECC-(E-Mail Removed)...
> Hello everyone,
>
> I had a question regarding the use of an ADODB.Recordset variable.
>
> When I add a new record to a table using it, it creates a local file at
> the
> moment the code runs the .save command. The file is named exactly like the
> table the Recordset was opened on, and is located in the MyDocuments
> folder.
> The file remains even after '.close' or 'Set X = nothing' flush commands.
>
> Note that it does not occur when using the .update command; which I now
> use.
> Nevertheless, I was wondering why it would happen.



The Save method of the ADO Recordset is specifically for saving a copy of
the recordset to a file or stream -- it is not in any way equivalent to the
Update method. If you don't specify the output file location, the Save
method defaults to creating a file with a name that comes from the Source
property of the recordset.

Unless your intention is to create an external copy of the recordset, you
should not be calling the Save method. The Update method is the one that
saves your changes to the current record.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
Reply With Quote
 
The Dude
Guest
Posts: n/a
 
      30th Sep 2008
Ok, thank you Dirk.
I will use the update function from now on; note that I'm glad to have the
explanation on the save function... might be helpful someday.

Thanks
T_D

"Dirk Goldgar" wrote:

> "The Dude" <f_com2°AT°yahoo°DOT°fr> wrote in message
> news:12EEDF26-3113-4C03-AECC-(E-Mail Removed)...
> > Hello everyone,
> >
> > I had a question regarding the use of an ADODB.Recordset variable.
> >
> > When I add a new record to a table using it, it creates a local file at
> > the
> > moment the code runs the .save command. The file is named exactly like the
> > table the Recordset was opened on, and is located in the MyDocuments
> > folder.
> > The file remains even after '.close' or 'Set X = nothing' flush commands.
> >
> > Note that it does not occur when using the .update command; which I now
> > use.
> > Nevertheless, I was wondering why it would happen.

>
>
> The Save method of the ADO Recordset is specifically for saving a copy of
> the recordset to a file or stream -- it is not in any way equivalent to the
> Update method. If you don't specify the output file location, the Save
> method defaults to creating a file with a name that comes from the Source
> property of the recordset.
>
> Unless your intention is to create an external copy of the recordset, you
> should not be calling the Save method. The Update method is the one that
> saves your changes to the current record.
>
> --
> Dirk Goldgar, MS Access MVP
> www.datagnostics.com
>
> (please reply to the newsgroup)
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Report:Sum() doesn't work when recordset based on adodb command object Tom Grillot Microsoft Access 2 22nd Dec 2005 10:24 PM
How to load data in ListBox using one command from ADODB RecordSet =?Utf-8?B?QWxwZXNoIFBhdGVs?= Microsoft Access 3 24th Aug 2005 10:35 AM
How to load data in ListBox using one command from ADODB RecordSet =?Utf-8?B?QWxwZXNoIFBhdGVs?= Microsoft Access Getting Started 3 22nd Aug 2005 10:54 PM
Equivalent ADODB.Connector and ADODB.Recordset in VB.NET Marty Microsoft Dot NET 3 25th Sep 2004 10:36 PM
Create local table from ADODB recordset martyn Microsoft Access VBA Modules 2 21st May 2004 02:33 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:06 AM.