G
Glenn Thimmes
Hello,
I am having a problem inserting into a dataset that is loaded from a view
that does joins with other tables and includes required fields from those
tables. For example, I might have a view that is an Orders view which does a
join to a Contact table and contains the contact's last name (required
field). Now, when I do an insert, I only want to insert the information
pertaining to the Order, which is then sent back to the business object and
processed with stored procedures.
The problem is, when I create a new row, add the order information, and try
to add the row into my table, I get an error saying that column 'Last' does
not allow nulls. This is not desirable. I would like to send only necessary
information, like the ContactID, back over the wire. The workaround I have
found for this issue is to manually certain fields to allow DBNulls. This
worked out ok for writing unit tests for my business object, but it is not
an option for production code.
I guess I would like a way to fill a dataset with the table/column schema,
but without any further schema/constraints. My smart client already has a
separate 'screen' schema that defines foreign key and required field
constraints.
Thanks for any suggestions!
-Glenn
I am having a problem inserting into a dataset that is loaded from a view
that does joins with other tables and includes required fields from those
tables. For example, I might have a view that is an Orders view which does a
join to a Contact table and contains the contact's last name (required
field). Now, when I do an insert, I only want to insert the information
pertaining to the Order, which is then sent back to the business object and
processed with stored procedures.
The problem is, when I create a new row, add the order information, and try
to add the row into my table, I get an error saying that column 'Last' does
not allow nulls. This is not desirable. I would like to send only necessary
information, like the ContactID, back over the wire. The workaround I have
found for this issue is to manually certain fields to allow DBNulls. This
worked out ok for writing unit tests for my business object, but it is not
an option for production code.
I guess I would like a way to fill a dataset with the table/column schema,
but without any further schema/constraints. My smart client already has a
separate 'screen' schema that defines foreign key and required field
constraints.
Thanks for any suggestions!
-Glenn