I need to write a procedure that inserts data from one Access database
into another Access database through VBScript. I imagine that this
would be done with Recordsets. Can anyone post an example of how to do
this for me?

Basically I would want to:

1. select name, date, status from table in 1st database
2. insert that result set into a history table in another database,
checking to be sure that it won't create duplicate rows.

The databases have to remain separated since the first database is
created by a proprietary application.

Thanks in advance for all replies.

Re: VBScript:Update One Access DB from Another by Bob

Bob
Wed Dec 03 07:51:52 CST 2003

Brandon Marino wrote:
> I need to write a procedure that inserts data from one Access database
> into another Access database through VBScript. I imagine that this
> would be done with Recordsets. Can anyone post an example of how to do
> this for me?
>
> Basically I would want to:
>
> 1. select name, date, status from table in 1st database
> 2. insert that result set into a history table in another database,
> checking to be sure that it won't create duplicate rows.
>
> The databases have to remain separated since the first database is
> created by a proprietary application.
>
> Thanks in advance for all replies.

If you create a linked table from the first database in the second database,
you will be able to do a direct INSERT statement, no recordsets involved.
See Access online help or post to an Access newsgroup for details on
creating a linked 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.