importing databases into an existing database 
Author Message
 importing databases into an existing database

Hi all,

I'm working on a project where a user can import an access, excel or
txt into an existing database.

The main database has the following Table Products:

        ProductID
        ProductName
        ProductDescr_Nl
        ProductDescr_Fr
        ProductCat
        ProductEAN
        ProductPic_Nl
        ProductPic_Fr
        ProductSupplier

Now, the user can import a file using a filter predefined in a
Supplier module which I made before. In this module the user can say
in which table/Field the app can find 'ProductID' for example.

The Import module  needs to check if the records exists in the main
database and it must be inserted if it's absent or updated if it's
present. Also, the imported-table/sheet includes a field with a link
to a picture on a cd-rom or a zipdrive. For each record which includes
a valid link, the picture has to be opened and converted to jpeg. As a
final step, the picture is being copied to the main server and a link
is being inserted in the main database. This must routine must happen
during the import, even if the record only needs to be updated.

Opening, converting and saving the image isn't a big problem, it's
only important when I should do this.

A small example:

Main database:

Table: Products
        ProductID
        ProductName
        ProductDescr_Nl
        ProductDescr_Fr
        ProductCat
        ProductEAN
        ProductPic_Nl
        ProductPic_Fr
        ProductSupplier

Host database:

Table: Products
        ProdId: 012343 (unique)
        ProdNm: Candle
        ProdPic_Nl: /010/0123401.jpg
        ProdEAN: 77345532 (unique)
        ProdSuppl: Some name

ProductID is the primary key in the main database and in both tables
the EAN-code is unique.

The productId in the main database is the ProdId-field of the host
database added with the name of the supplier.

Now, assuming the record isn't there, it needs to be inserted. If it
is there, it needs to be updated.

Could someone give me a hint on how to handle the actual import
situation.

I hope I've been clear enough about this situation, any help, hints or
code is greatly appreciated.

Frank



Fri, 25 Oct 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Display message if database to import to doesn't exist

2. Q: Importing ascii delimitted to Access 7.0 existing database/tables

3. Exporting Text Database into Existing Database (.MDB)

4. database object doesn't exist in database main(13)

5. Exporting Text Database into Existing Database (.MDB)

6. Importing Word doc into Access database or Oracle database

7. Importing Word doc into Access database or Oracle database

8. How to modified existing field and add new field in existing table for Access database

9. type database doesn't exist?

10. Using Codes to scheck if a table exists in Access database

11. Exporting form to existing database

12. Updating a single OLE link for a record OR updating existing database

 

 
Powered by phpBB® Forum Software