I post a message about this, but noone responded.. Well, I've played
around as much as I can and I'm completely stuck and out of ideas.
This should be a really simple task, but it seems that it is beyond me
why this has to be so hard to do.
I have two tables, the ID is an Autonumber in Table 1. Table two is the
child to the previous table. Table 2 is in a grid. I enter information
in table 1, then I go to the grid and enter a row there. Then I do to
save, which does the Update, and it fails on table one saying that an
object hasn't been instantied, but it still saves the record, but also
creates another record, with a new ID from the SQL server. The previous
record still has 0 in the ID, and has the table 2 record related to it.
The new record in table 1 has no child records. If I just simply hit
save again, it comes up with this Foreign Key constraint error that says
that parent records must exist for this child record.
I've tried removing the ID in the insert and update statments for the
child, I've tried saving the parent before entering the grid. (I'm doing
an EndCurrentEdit right now) Nothing seems to fix it. A lot of changes
make it worse.
How the heck are you supposed to do this? It seems like a simple task,
but it's becoming a severe head ache.
--
---
Aaron Smith
Remove -1- to E-Mail me. Spam Sucks.