tableadapter update problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arevans
    New Member
    • Sep 2007
    • 4

    #1

    tableadapter update problem

    I can't seem to update the data source when I call the tableadapter's update method. Here is my code:

    DealsTableAdapt er ta = new DealsTableAdapt er();
    dsDeals.DealsDa taTable dt = new dsDeals.DealsDa taTable();
    dsDeals.DealsRo w dr = dt.NewDealsRow( );
    dr.NominalRate =varNewRate; // defined above
    ta.Update(dr);

    The update command on the table adapter looks like this:

    UPDATE Deals
    SET NominalRate = @NominalRate

    If I use the query builder, and supply a parameter value for NominalRate, it works. But otherwise, no.

    I am not sure what I am missing here. (I don't want to use sqlCommand as I have many fields to update.
    NominalRate is just one of them, just for testing purposes.)

    Andy
Working...