If I create and fill a standalone ADO recordset is there any way I can write
SQL to compare these records with an existing Access table? I have an Access
database with photo file names and descriptions in a table. My vbscript
builds a standalone recordset based on jpg files found in some folder. I
would like to report any records missing in either the database table or
files in the folder.

thanks
ljb

Re: standalone ADO recordset by Bob

Bob
Mon Jan 03 15:11:53 CST 2005

ljb wrote:
> If I create and fill a standalone ADO recordset is there any way I
> can write SQL to compare these records with an existing Access table?
> I have an Access database with photo file names and descriptions in a
> table. My vbscript builds a standalone recordset based on jpg files
> found in some folder. I would like to report any records missing in
> either the database table or files in the folder.
>
> thanks
> ljb
No. you would have to enter the data into an Access table in order to use
SQL to compare it.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Re: standalone ADO recordset by ljb

ljb
Mon Jan 03 15:59:03 CST 2005


"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:e6kfajd8EHA.1404@TK2MSFTNGP11.phx.gbl...
> ljb wrote:
> > If I create and fill a standalone ADO recordset is there any way I
> > can write SQL to compare these records with an existing Access table?
> > I have an Access database with photo file names and descriptions in a
> > table. My vbscript builds a standalone recordset based on jpg files
> > found in some folder. I would like to report any records missing in
> > either the database table or files in the folder.
> >
> > thanks
> > ljb
> No. you would have to enter the data into an Access table in order to use
> SQL to compare it.
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
Is there any quick way to convert a standalone recordset into a table? I
came across some examples to save the recordset as XML. Then the XML was
loaded, modified using DOM, saved again and then opened in Access. It seemed
like a lot of work just to create the missing field info. Perhaps there
isn't anything quicker than just creating a table and loading it from
vbscript which I guess is quite similar to what I'm doing already.

thanks
ljb



Re: standalone ADO recordset by Bob

Bob
Mon Jan 03 16:04:33 CST 2005

ljb wrote:
> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> news:e6kfajd8EHA.1404@TK2MSFTNGP11.phx.gbl...
>> ljb wrote:
>>> If I create and fill a standalone ADO recordset is there any way I
>>> can write SQL to compare these records with an existing Access
>>> table? I have an Access database with photo file names and
>>> descriptions in a table. My vbscript builds a standalone recordset
>>> based on jpg files found in some folder. I would like to report any
>>> records missing in either the database table or files in the folder.
>>>
>>> thanks
>>> ljb
>> No. you would have to enter the data into an Access table in order
>> to use SQL to compare it.
> Is there any quick way to convert a standalone recordset into a
> table? I came across some examples to save the recordset as XML. Then
> the XML was loaded, modified using DOM, saved again and then opened
> in Access. It seemed like a lot of work just to create the missing
> field info. Perhaps there isn't anything quicker than just creating a
> table and loading it from vbscript which I guess is quite similar to
> what I'm doing already.
>
You can use ADO (or ADOX) to create the table and then generate INSERT
statements to insert the data from the recordset into the table. You can
even bypass the ad hoc recordset and enter the data directly into your
Access table

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Re: standalone ADO recordset by sali

sali
Mon Jan 03 18:01:11 CST 2005

"ljb" <.> wrote in message news:#vKnZcd8EHA.1228@tk2msftngp13.phx.gbl...
> If I create and fill a standalone ADO recordset is there any way I can
write
> SQL to compare these records with an existing Access table? I have an
Access
> database with photo file names and descriptions in a table. My vbscript
> builds a standalone recordset based on jpg files found in some folder. I
> would like to report any records missing in either the database table or
> files in the folder.
>

if your jpg's folder is read "on-the-fly", why not to place
relevant info directly into *dictionary* [instead of creating "recordset"],
then
load access table [relevant columns] into second dictionary, and then simply
compare two dictionaries? [there is special scripting dictionary object]



Re: standalone ADO recordset by ljb

ljb
Tue Jan 04 07:51:45 CST 2005


"sali" <gabor.salai@tel.net.ba> wrote in message
news:%23ezjFCf8EHA.3944@TK2MSFTNGP12.phx.gbl...
> "ljb" <.> wrote in message news:#vKnZcd8EHA.1228@tk2msftngp13.phx.gbl...
> > If I create and fill a standalone ADO recordset is there any way I can
> write
> > SQL to compare these records with an existing Access table? I have an
> Access
> > database with photo file names and descriptions in a table. My vbscript
> > builds a standalone recordset based on jpg files found in some folder. I
> > would like to report any records missing in either the database table or
> > files in the folder.
> >
>
> if your jpg's folder is read "on-the-fly", why not to place
> relevant info directly into *dictionary* [instead of creating
"recordset"],
> then
> load access table [relevant columns] into second dictionary, and then
simply
> compare two dictionaries? [there is special scripting dictionary object]
>
>
I like the idea of a dictionary. I've never used one before.
I think I will...
1. Load a DiskDictionary with all files found on disk
2. Query the database table
3. For each item in database recordset I will remove the matching item from
DiskDictionary
4. If an item is not found in DiskDictionary add it to a DBDictionary
5. Report any items remaining in DiskDictionary as "missing from db"
6. Report any items in DBDictionary as "missing from disk"

thanks