This example is incomplete
The final step of how to add records to the orders table related to each customer record is missing. Obviously in this example we know the customer id and can simply call the add method on the orders table and add a row. But if the primary key was an int32 with auto increment set true how can i find the value of this key so i can add records to the child table?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 8a6b9c0c-3651-3f47-7a06-d5470a73ff90
- Version Independent ID: edfa5594-5aa3-0ecf-fab5-409a1e782276
- Content: Adding Data to a DataTable
- Content Source: docs/framework/data/adonet/dataset-datatable-dataview/adding-data-to-a-datatable.md
- Service: unspecified
- Product: dotnet-framework
- GitHub Login: @douglaslMS
- Microsoft Alias: douglasl
@Bunny2000 Do you have code already in place where you can test this easily? Check the value of workRow[0] (assuming the primary key is the first column) or workRow[<identity_column_name>] after the Rows.Add call.
#in-progress
Thanks works a treat
On 21 May 2018 2:07:10 am ACST, Douglas Laudenschlager [email protected] wrote:
@Bunny2000 Do you have code already in place where you can test this easily? Check the value of workRow[0] (assuming the primary key is the first column) or workRow[<identity_column_name>] after the Rows.Add call.
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/dotnet/docs/issues/5488#issuecomment-390494643
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.