Question : ASP Quickie to read loacl Access DB & update one table from another

First off is is possible for me to create an ASP on a local machine to execute against a local Access DB both on C drive?
 
If the answer to the above is yes, I need a quick example (ASP) that would read one table and update it based on the contents of another.

lets say I have a one Access table called LIST001 with the following fields:

ID
Date
Cost
Phase
Descriptrion
Color

The second table LIST002 has the following:

ID
Description
Phase

I need to read table LIST001 record by record and check for a coresponding ID in LIST002 and update the common fields in LIST001 with the Values from LIST002.

Answer : ASP Quickie to read loacl Access DB & update one table from another

1. You need to use the following driver for connect to MS Access 2007 Database
Provider=Microsoft.ACE.OLEDB.12.0
then you  can connect as follows if page and database are in same directory
conn.Open(Server.Mappath("Opportunity_Feeder.accdb"))

2. you can update any number of fields above was just an example.
to update 2 fields, you can use the following:
conn.execute("update LIST002 set field1 = " & rs("field1") & ",field2 = " & rs("field1") & " where id = " & id)
Random Solutions  
 
programming4us programming4us