Arg81
Well-known member
Now that I have the @@Identity issue solved, I've noticed a little problem when adding a new record with child data.
It's to do with heirachical (spelt wrong i know) - If I enter the data on the main form for my first table, and submit, the data goes into the SQL server to table1 correctly.
However, if I then try to add a record to the datagrid which should show child data, I get an error bombing my out on table2's primary key ID field - "Tab2ID cannot be null".
My datagrid is set to read only, and I open a form using currency manager to edit the current selected record in the datagrid.
The weird thing is, if I go into SQL and add manually to the table, I can then open the other form (set up the same) to view the data, and add data to the datagrid.
Problem only happens when adding new table1 fields with child data to table2.
Is this a common problem as I've actually got the same errors with some examples I've downloaded.
Cheers
Luke
It's to do with heirachical (spelt wrong i know) - If I enter the data on the main form for my first table, and submit, the data goes into the SQL server to table1 correctly.
However, if I then try to add a record to the datagrid which should show child data, I get an error bombing my out on table2's primary key ID field - "Tab2ID cannot be null".
My datagrid is set to read only, and I open a form using currency manager to edit the current selected record in the datagrid.
The weird thing is, if I go into SQL and add manually to the table, I can then open the other form (set up the same) to view the data, and add data to the datagrid.
Problem only happens when adding new table1 fields with child data to table2.
Is this a common problem as I've actually got the same errors with some examples I've downloaded.
Cheers
Luke