Update the items of a table from my application - winforms

How can I update the items of a table from my application without using Entity Framework?
I have written a stored procedure to get values from invoice and presented in a DataGridView.
But I don't know how to update the database.
Kindly help

Related

SQL Server : best way to check values before insert to table

I am working in a company that has software that can connect to a database and push values to a table.
I have a problem that some properties do not insert into the database.
I check regular insert query in the SQL Server Management Studio, and the insert is ok there.
I want to check the values that came from my software company before insert to the table.
Friends, please help me.
Thanks
You can use extended events(light weight version of profiler).You may choose filters as per your requirement and in set session filters screen you can try scoping to a single database or a table or even some text using like syntax
Below are the steps

Hide Committed Data

I facing an issues no to show committed data in my table. For example once user upload data from excel it will display under the table below. Once user click save those data will be committed to database and it won't show again. Any suggestion for resolving this issues?(i am using adf Studio Edition Version 11.1.1.7.0) Thank you very much.
What's the data-model that populates your table? Once you click the commit button you'll need to remove the rows from that data model. So for example if your data model is based on a query - then you will need to find a SQL that doesn't include the rows that are in the table.

EntityFramework wants to delete a table from my data model that is very clearly in the database. Any ideas why?

I am attempting to update my EntityFramework data model from a SQL 2008 database to add a couple new tables. There are at least 100 other tables in the model and they are all fine and slated to be refreshed, but EF keeps insisting that this one table does not exist in the database, even though I am looking right at it and can select from it, and adds it to the "Delete" list. The connection string is correct and the columns inside the table match what is currently there. Any idea why this might be happening and how I can fix it?

Crystal Reports using datasets that are not already created

I am working for a Windows Application using WPF, c# in Visual Studio 2010 and Crystal Reports. I can create a report easily by adding a DataSet item to the project first, add tables to it and setting it as a datasource for the Report. What I need to do is create a dataset that can fetch data from tables that generate from time to time.
*For Ex- If the current year is 2012, the dataset should fetch information from table FEE_2012_2013, or if the current year is 2013, it should fetch the data from the Table FEE_2013_2014. I am creating these tables at runtime. How can I achieve this? Please help.*
Edit: I guess I need an alternative to STRONGLY TYPED DATASETS FOR CR.
Here is an article on how you can come close to what you want:
Its quite complicated and you will have to spend some time on it to alter it to your requirements.
Read this
One of the quicker and better ways will be to just keep one table and add an additional column for an academic year.
Just design the report with a generic table name, and then update the report schema at runtime to match the current database schema.
myReport.Database.Tables("FEE").Location = "MyDatabase.dbo.FEE_2013_2014"
Table.Location

Why would an Entity Framework model generator not create code for a table when I selected it?

I have Visual Studio 2008:
I can create Entity Framework models on existing tables in a SQL Server 2005 database.
I can create Entity Framework models on tables I create in a local SQL Server 2008 database files.
However, when I add a new table to the SQL Server 2005 database, then try to create an Entity Framework model on it, it lets me click the little checkbox next to the table and finish, but the .edmx/...Designer.cs file consists only of four methods but nothing about the table that I selected, as if the I hadn't selected it.
What could be causing code not to be generated on the table I selected?
Where could I look for error messages regarding the attempted creation of code for this table?
0) I think, you have added and then deleted this table before. In this case you should open model file (Designer.cs), remove all this table related records (manualy) and then refresh the model.
1) Maybe you have many-to-many relationship tables. EF decides no to add "link" table in this case.
2) Maybe you have a table that has two fields (PK and FK to other one) ONLY. In this case EF does the same.
3) Install later SP to VS and framework.
4) Check connection string.

Resources