liquidchild
Member
- Joined
- May 1, 2008
- Messages
- 7
- Programming Experience
- 3-5
Hey
I am 'trying' to code an application that moves data from one database to another, then deletes the original source data.
However the main problem is that the source data in the original database is bound by ref constraints etc which makes the process harder as the data obviously has to be deleted in an certain order.
I was wondering if I can use ado tables and datasets to achieve this? I know there is the obvious way of doing individual select and delete statements based on the parent and child relationships.
However I have read about setting up constraints on ado tables and using cascade delete on these constraints, so basically I thought of replicating the constraints that are in my source database - would this work?
Also, If lets say I have my parent table 'A' populated by doing a general select, I then want to populate my next table 'B' based on a field in this table, i.e. so I only get the children from 'B', is there another way to do this rather than loop round each time creating a row and adding it to a datatable? Perhaps using the select command or the like?
This is an old system that I have picked up, while I know there are other ways of doing this, I am trying to keep it in the realms of what I have been handed.
Thanks in advance!
I am 'trying' to code an application that moves data from one database to another, then deletes the original source data.
However the main problem is that the source data in the original database is bound by ref constraints etc which makes the process harder as the data obviously has to be deleted in an certain order.
I was wondering if I can use ado tables and datasets to achieve this? I know there is the obvious way of doing individual select and delete statements based on the parent and child relationships.
However I have read about setting up constraints on ado tables and using cascade delete on these constraints, so basically I thought of replicating the constraints that are in my source database - would this work?
Also, If lets say I have my parent table 'A' populated by doing a general select, I then want to populate my next table 'B' based on a field in this table, i.e. so I only get the children from 'B', is there another way to do this rather than loop round each time creating a row and adding it to a datatable? Perhaps using the select command or the like?
This is an old system that I have picked up, while I know there are other ways of doing this, I am trying to keep it in the realms of what I have been handed.
Thanks in advance!