c# - Using SQL Server Database View for populating DataGridView and modifying data in DB -


Use SQL Server Database Viewing Populating DataGridView and Modifying Data in DB < / P>

I want to know how this will be done and if this is not a good solution, please expand if another good solution is possible .


1) Initially I want to use a view database for populating different DataGridViews .

2) tables for data-retrieval are required for multiple individuals consisting of multiple DataGridView .

3) The value of these DataGridViews then the control (i.e. text box / combo-box) (please refer to the picture on this link for reference).

4) When the user changes values ​​in controls , and click Save , first DataGridView (via < Code> View ) to be updated in the database . Code>.


Note: I am using C-Sharp Windows Application and SQL Server 2005. 1) I'm not sure how you can tie the controls directly into a scene, but you can You can edit the dataset (right click on your dataset using the designer under the data source and click on "Edit Dataset in Designer". Click OK and add a table adapter that you want but you want (For example

  SELECT * FROM [YourView]  

Alternatively, you simply type SQL to populate a stored procedure or table adapter.

Once you add the table adapter to your dataset, then you force your datagear to that table adapter. As you are in the regular table.

I know what this is probably for you now, but the truth is that I came to your question, while more or less the same thing Tried to.

2) or you can be based on several tables adapter using a SQL statement or a stored procedure tables.

3) Why do not you tie those controls directly using those data source properties?

4) If the controls are bound by itself you can change through the control of data and you need to "refresh" to see the changes in your datagrid (see update data). It is called 'database' for it).


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -