I'm using VB and SQL Server 2008 Express.
These are the steps I take to make a simple SQL database application:
Create new Windows Application project.
Add new item; Service-based Database named MyDB.mdf.
In Data Explorer, Add new table named Person.
Add two columns, ID and FirstName.
Add New Data Source, creates MyDBDataSet.
Drag Person table from DataSet to Form1, generating PersonDataGridView etc..
The code generated by VS includes navigation and a Save button.
The application runs OK. I can add records and save changes.
Now I need to change the database (add LastName column).
What steps are needed to have the DataSet reflect the modified database?
I've tried several methods but have problems.
A. If I delete the DataSet from Solution Explorer,
Form1.vb [Design] changes to a special Error Report, beginning with this line:
"To prevent possible data loss before loading the designer, the following errors must be resolved:"
So that doesn't look good.
B. If I delete objects in other ways, and Add New Data Source, and drag the DataSet again,
The PersonBindingNavigator is not generated.
Is there a way to do this when using these "simple" methods?
I would think this is a common challenge when new versions of business applications are released. But perhaps they have other tools.
These are the steps I take to make a simple SQL database application:
Create new Windows Application project.
Add new item; Service-based Database named MyDB.mdf.
In Data Explorer, Add new table named Person.
Add two columns, ID and FirstName.
Add New Data Source, creates MyDBDataSet.
Drag Person table from DataSet to Form1, generating PersonDataGridView etc..
The code generated by VS includes navigation and a Save button.
The application runs OK. I can add records and save changes.
Now I need to change the database (add LastName column).
What steps are needed to have the DataSet reflect the modified database?
I've tried several methods but have problems.
A. If I delete the DataSet from Solution Explorer,
Form1.vb [Design] changes to a special Error Report, beginning with this line:
"To prevent possible data loss before loading the designer, the following errors must be resolved:"
So that doesn't look good.
B. If I delete objects in other ways, and Add New Data Source, and drag the DataSet again,
The PersonBindingNavigator is not generated.
Is there a way to do this when using these "simple" methods?
I would think this is a common challenge when new versions of business applications are released. But perhaps they have other tools.