Click here to Skip to main content
15,899,013 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple loop problems ?? Pin
nlowdon19-Nov-08 12:12
nlowdon19-Nov-08 12:12 
GeneralRe: Simple loop problems ?? Pin
Colin Angus Mackay19-Nov-08 12:26
Colin Angus Mackay19-Nov-08 12:26 
GeneralRe: Simple loop problems ?? Pin
nlowdon19-Nov-08 13:22
nlowdon19-Nov-08 13:22 
AnswerRe: Simple loop problems ?? Pin
mutafa8119-Nov-08 13:55
mutafa8119-Nov-08 13:55 
AnswerRe: Simple loop problems ?? Pin
That Asian Guy19-Nov-08 14:30
That Asian Guy19-Nov-08 14:30 
AnswerRe: Simple loop problems ?? Pin
JamesChen719-Nov-08 15:18
JamesChen719-Nov-08 15:18 
QuestionData Importing one column Pin
postonoh19-Nov-08 10:29
postonoh19-Nov-08 10:29 
AnswerRe: Data Importing one column Pin
Wendelius19-Nov-08 11:09
mentorWendelius19-Nov-08 11:09 
If the referential integrity is lost in the migration process, I don't think there's any way to restore the correct foreign keys afterwards (unless you have other logic in the data that can combine correct invoice and contact).

Based on your description, it seems that the referential integrity is not enforced in your database and this lead to these problems. What I suggest is that you repeat the migration, but this time before migrating the data, put constraints to enforce the integrity.

I take it, that you use identity columns in the new database. If this is the case, your migration logic should be something like:
while (ReadOriginalContact) {
   InsertContactToNewDatabase
   GetTheNewIdentityForContact
   while (ReadOriginalInvoiceForThisContact)
      InsertInvoiceToNewDatabaseWithNewContactId)
   }
}


The need to optimize rises from a bad design.

My articles[^]

QuestionNeed help making a webbrowser... Pin
lekira19-Nov-08 10:14
lekira19-Nov-08 10:14 
AnswerRe: Need help making a webbrowser... Pin
Pedram Behroozi19-Nov-08 10:20
Pedram Behroozi19-Nov-08 10:20 
GeneralRe: Need help making a webbrowser... Pin
lekira19-Nov-08 10:31
lekira19-Nov-08 10:31 
GeneralRe: Need help making a webbrowser... Pin
Pedram Behroozi19-Nov-08 20:03
Pedram Behroozi19-Nov-08 20:03 
GeneralRe: Need help making a webbrowser... [modified] Pin
lekira20-Nov-08 15:02
lekira20-Nov-08 15:02 
QuestionAccessing a parent class' methods Pin
Anthony Mushrow19-Nov-08 10:12
professionalAnthony Mushrow19-Nov-08 10:12 
AnswerRe: Accessing a parent class' methods Pin
Ennis Ray Lynch, Jr.19-Nov-08 10:21
Ennis Ray Lynch, Jr.19-Nov-08 10:21 
GeneralRe: Accessing a parent class' methods Pin
Anthony Mushrow19-Nov-08 10:23
professionalAnthony Mushrow19-Nov-08 10:23 
GeneralRe: Accessing a parent class' methods Pin
Ennis Ray Lynch, Jr.19-Nov-08 10:29
Ennis Ray Lynch, Jr.19-Nov-08 10:29 
GeneralRe: Accessing a parent class' methods Pin
N a v a n e e t h19-Nov-08 16:05
N a v a n e e t h19-Nov-08 16:05 
GeneralRe: Accessing a parent class' methods Pin
Ennis Ray Lynch, Jr.20-Nov-08 2:47
Ennis Ray Lynch, Jr.20-Nov-08 2:47 
AnswerRe: Accessing a parent class' methods Pin
Roger Alsing20-Nov-08 0:32
Roger Alsing20-Nov-08 0:32 
QuestionMulti-function panel display Pin
kanchoette19-Nov-08 9:18
kanchoette19-Nov-08 9:18 
AnswerRe: Multi-function panel display Pin
Pedram Behroozi19-Nov-08 9:46
Pedram Behroozi19-Nov-08 9:46 
QuestionSending commands and infotmation to a web page Pin
Sabry190519-Nov-08 7:16
Sabry190519-Nov-08 7:16 
AnswerRe: Sending commands and infotmation to a web page Pin
Ennis Ray Lynch, Jr.19-Nov-08 9:46
Ennis Ray Lynch, Jr.19-Nov-08 9:46 
GeneralRe: Sending commands and infotmation to a web page Pin
Sabry190520-Nov-08 6:30
Sabry190520-Nov-08 6:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.