Exporting selected records to new DB (access and VB3) 
Author Message
 Exporting selected records to new DB (access and VB3)

Hallo,
Ive got an ACCESS-Database with active referential integrity rules.
The task is it to select some records (dynaset) and create a new DB.

First Problem:
How Can I preserve the relations by Counter-fields if I can't
update the Counter-field manually?
(Field isn't filled with continous numbers)

Second problem:
Which tables can be transferred (first and so on) without violating the
integrity rules?

Is it possible to delete all relations, indexes and counters and
do this by ACCESS, controlled or invoked by VB?

Do You know a better or simpler way to do this?

Please answer soon.

TIA Uwe

Live long and prosper!



Wed, 22 Dec 1999 03:00:00 GMT  
 Exporting selected records to new DB (access and VB3)



Quote:
> Hallo,
> Ive got an ACCESS-Database with active referential integrity rules.
> The task is it to select some records (dynaset) and create a new DB.

> First Problem:
> How Can I preserve the relations by Counter-fields if I can't
> update the Counter-field manually?
> (Field isn't filled with continous numbers)

If you use an append query within Access to copy records from one file to
another, the records in the new table will have the same keys as the
records in the old one.

Quote:
> Second problem:
> Which tables can be transferred (first and so on) without violating the
> integrity rules?

Wherever you have a one to many relationship defined, you need to transfer
the table on the "one" side first, and then transfer the table on the
"many" side.

Quote:
> Is it possible to delete all relations, indexes and counters and
> do this by ACCESS, controlled or invoked by VB?

> Do You know a better or simpler way to do this?

Just to clarify, here's how to do this from within VB:

1) Define your append queries in Access.  Test them.

2) In VB, create a QueryDef object for each of the queries.

3) Execute the queries in the proper order:  "one" side first, then "many"
side.

Hope this helps.

Bob Rossney



Fri, 24 Dec 1999 03:00:00 GMT  
 Exporting selected records to new DB (access and VB3)

What you're talking about here is like replication performed by SQL
back-end databases, and can be quite difficult, depending obviously on the
complexity of the database(s).

What you could possibly do is something like:

Open the table in db (A), append to table in db (B), have a field in db (B)
table that holds what the old value of the counter field was in db (A),
then relate that old ID to the next table you do, and continue the
excercise on down the line (You obviously need to do it from higest level
to lowest level IE One side to the Many side)

I've seen groups try and fail, and I've had varying success with trying to
do replication myself, products like Access 95 onward, and SQL Server can
handle that for you (in SQL Server there's actually a full on replication
Server to handle that). If you've only got a couple of tables, you
shouldn't have much problem.

Anyway, hope this helps.

Cheers,

Nathan.



Quote:
> Hallo,
> Ive got an ACCESS-Database with active referential integrity rules.
> The task is it to select some records (dynaset) and create a new DB.

> First Problem:
> How Can I preserve the relations by Counter-fields if I can't
> update the Counter-field manually?
> (Field isn't filled with continous numbers)

> Second problem:
> Which tables can be transferred (first and so on) without violating the
> integrity rules?

> Is it possible to delete all relations, indexes and counters and
> do this by ACCESS, controlled or invoked by VB?

> Do You know a better or simpler way to do this?

> Please answer soon.

> TIA Uwe

> Live long and prosper!



Fri, 24 Dec 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Exporting Tables From One Access DB to a New One

2. VB3 interacting with Access 2 - New Record

3. Adding new Records to Access DB using ADO/Jet4.0

4. Exporting Access DB to DB III thru VB?

5. export data from one access db to same db on another machine using vb6

6. accessing records in one secure DB from another secure DB - programatically

7. Exporting and importing records of a db

8. Exporting and importing records of a db

9. Exporting selected records to another table

10. accessing Access-DB on readonly-Volume with VB3

11. VB3 DB record locking

12. User selects a new location for attached db tables

 

 
Powered by phpBB® Forum Software