M
Micus
[Win XP Pro, SQL Server 2000, VS 2005 Pro, C++/CLI]
I'm having a problem with using the SqlDataAdapter->Fill() method. I
have 2 tables, Orders & Customers which are related by a CustomerID. I have
2 DataAdapters that I'm using to Fill() a dataset: the first to
Fill(dataset, "Orders") between 2 dates; the second to Fill(dataset,
"Customers") based on the order rows retrieved. Whenever the same customer
has 2 or more orders retrieved, Fill(dataset, "Customers") generates a
constraint error. The CustomerID, which is the only column with constraints,
is an autoincrement primary key and I'm using
MissingSchemaAction::AddWithKey. I'm still learning DB programming and I
can't find what I'm doing wrong.
Thank you,
M
I'm having a problem with using the SqlDataAdapter->Fill() method. I
have 2 tables, Orders & Customers which are related by a CustomerID. I have
2 DataAdapters that I'm using to Fill() a dataset: the first to
Fill(dataset, "Orders") between 2 dates; the second to Fill(dataset,
"Customers") based on the order rows retrieved. Whenever the same customer
has 2 or more orders retrieved, Fill(dataset, "Customers") generates a
constraint error. The CustomerID, which is the only column with constraints,
is an autoincrement primary key and I'm using
MissingSchemaAction::AddWithKey. I'm still learning DB programming and I
can't find what I'm doing wrong.
Thank you,
M