E
Eric
I've written a lot of programs and a lot of VB but I'm new to VB.NET so it
may be something obvious I'm missing.
I created a new project in the .NET Express 2008 IDE.
I created a new data with definition (.mdf) with one table.
I created a screen program with a grid and a button.
I put some code into the program which is supposed to load the data table
into the grid on initial startup.
I put some code into the button push event to add a new record to the table
and update using the tableadapter.
When I run the program the grid is blank. When I push the button it adds a
row to the grid. I assume it's updating the table. If I push the button
again it says cannot add duplicate row. If I exit the program and run it
again, the grid comes up blank and pushing the button adds a row. How do I
get it to write to the database, to save the data when I exit so the row
appears the next time I run it?
may be something obvious I'm missing.
I created a new project in the .NET Express 2008 IDE.
I created a new data with definition (.mdf) with one table.
I created a screen program with a grid and a button.
I put some code into the program which is supposed to load the data table
into the grid on initial startup.
I put some code into the button push event to add a new record to the table
and update using the tableadapter.
When I run the program the grid is blank. When I push the button it adds a
row to the grid. I assume it's updating the table. If I push the button
again it says cannot add duplicate row. If I exit the program and run it
again, the grid comes up blank and pushing the button adds a row. How do I
get it to write to the database, to save the data when I exit so the row
appears the next time I run it?