Why can I not see new rows added to the database?
I am trying to run a .NET project someone gave me that contains a database MDF file and uses LINQ queries in the C# code, such as:
db = new DataClasses1DataContext();
using (db)
{
res01 r = new res01();
r.comb_bars = 1;
r.end_dte = b_list.Last().dteTme.Date;
r.pers = pers;
r.st_dte = b_list.First().dteTme.Date;
r.sym = sym;
db.res01s.InsertOnSubmit(r);
db.SubmitChanges();
}
I see that this code runs when I debug it, but it doesn't seem like any rows were added to the dat开发者_Go百科abase. Yet, I didn't get any errors while running the code. I am using Visual C# Express 2010. How can I see what has been added in the database MDF file that is part of the project?
Data is stored in the database file inside bin/Debug folder. Open that and check.
See this for more details on connecting to compact db
try to rebind() the grid. because the data have to be reloaded.
精彩评论