G
Guest
HI all
New to C#
I'm merging datasets. The source dataset is an excel file and the target
dataset is in SqlServer.
salesTracingCommisionNDCdataset1.Merge(ndcExcel,false,MissingSchemaAction.Error)
The merge works fine. It will populate a datagrid after the merge is
complete. However, when I issue the command to update the database, nothing
happens. No errors, no exceptions. nothing.
sqlDataAdapter2.Update(salesTracingCommisionNDCdataset1);
I've checked the schemas, data typing, and I've ensured that the database
has a primary Key. I've also ensured that I have proper permissions on the
database
Also. I let the Wizard generate the Update Command code.
UPDATE SalesTracingCommissionNDCtable
SET ItemNumber = @ItemNumber, Qty = @Qty, InvoiceDate =
@InvoiceDate, BranchNo = @BranchNo
WHERE (BranchNo = @Original_BranchNo) AND (InvoiceDate =
@Original_InvoiceDate) AND (ItemNumber = @Original_ItemNumber) AND
(Qty = @Original_Qty OR
@Original_Qty IS NULL AND Qty IS NULL);
SELECT ItemNumber, Qty, InvoiceDate, BranchNo
FROM SalesTracingCommissionNDCtable
WHERE (BranchNo = @BranchNo) AND (InvoiceDate
= @InvoiceDate) AND (ItemNumber = @ItemNumber)
Any advice on debugging?? Any help is appreciated
New to C#
I'm merging datasets. The source dataset is an excel file and the target
dataset is in SqlServer.
salesTracingCommisionNDCdataset1.Merge(ndcExcel,false,MissingSchemaAction.Error)
The merge works fine. It will populate a datagrid after the merge is
complete. However, when I issue the command to update the database, nothing
happens. No errors, no exceptions. nothing.
sqlDataAdapter2.Update(salesTracingCommisionNDCdataset1);
I've checked the schemas, data typing, and I've ensured that the database
has a primary Key. I've also ensured that I have proper permissions on the
database
Also. I let the Wizard generate the Update Command code.
UPDATE SalesTracingCommissionNDCtable
SET ItemNumber = @ItemNumber, Qty = @Qty, InvoiceDate =
@InvoiceDate, BranchNo = @BranchNo
WHERE (BranchNo = @Original_BranchNo) AND (InvoiceDate =
@Original_InvoiceDate) AND (ItemNumber = @Original_ItemNumber) AND
(Qty = @Original_Qty OR
@Original_Qty IS NULL AND Qty IS NULL);
SELECT ItemNumber, Qty, InvoiceDate, BranchNo
FROM SalesTracingCommissionNDCtable
WHERE (BranchNo = @BranchNo) AND (InvoiceDate
= @InvoiceDate) AND (ItemNumber = @ItemNumber)
Any advice on debugging?? Any help is appreciated