In Visual Studio 2005, I used the Data - Add New Data Source wizard to
create a new Table Adapter data set to interface to my SQL Server 2005
database.
Then I wrote this C# code to add new records to the database:
TradeRecordsDataSet TDataSet = new TradeRecordsDataSet();
DataRow NewRow = TDataSet.Tables["Trades"].NewRow();
NewRow["Symbol"] = Symbol;
NewRow["Mkt#"] = MktNo;
NewRow["MktType"] = MktType;
TDataSet.Tables["Trades"].Rows.Add(NewRow);
TDataSet.Tables["Trades"].AcceptChanges();
Everything executes properly, but when I open the table, there are no new
records. Does anybody know why my new records are not being committed to
the database?
Thanks in advance for any ideas.