This could be done without Invoke and with Invoke
Without Invoke:
Nafiul's Blog
Everything Around You Will Be Gone One Day, The Only Thing That Will Matter Is What You Did For Allah.
Saturday, April 4, 2020
Tuesday, February 19, 2019
SQL Server - Reset Table Identity Value and Insert
1. DBCC CHECKINDENT RESEED can be used to reset a tables identity value on a column.
Syntax: DBCC CHECKIDENT ('[Table_Name]', RESEED, 0);
This command will reset the identity column value to '0'.2. SET Identity_insert - allow inserting explicit values into the identity column of a table. The IDENTITY_INSERT statement must be set ON to insert explicit value for the identity column.
Syntax: SET IDENTITY_INSERT [dbo].[Table_Name] ON ;
Syntax: DBCC CHECKIDENT ('[Table_Name]', RESEED, 0);
This command will reset the identity column value to '0'.2. SET Identity_insert - allow inserting explicit values into the identity column of a table. The IDENTITY_INSERT statement must be set ON to insert explicit value for the identity column.
Syntax: SET IDENTITY_INSERT [dbo].[Table_Name] ON ;
Identity insert should be set to 'OFF' after insertion. To off identity insertion use following command.
Syntax: SET IDENTITY_INSERT [dbo].[Table_Name] OFF ;
Syntax: SET IDENTITY_INSERT [dbo].[Table_Name] OFF ;
Thursday, October 26, 2017
In C# WinForms Applications, how to display the row number in the row header in a DataGridView?
We could use the RowPostPaint event of DataGridView control.
Suppose grid is named as dgvUserDetails
Delegate:
Suppose grid is named as dgvUserDetails
Delegate:
Saturday, August 12, 2017
Cannot login on ASP.NET Identity 2 site after programmatic user creation. ApplicationUser userAdmin = new ApplicationUser { Id = "admin", Email = "me@there.com", UserName = "admin" };
I faced this stressing issue. It has to be with the default Login method created in the AccountsController:
Sunday, February 26, 2017
How to Post code snippets in Blogger
I had a lot of pain finding a easy way to post code snippets in blogger. After a lot of searching found a easy way. Here it is.
- Go to gist.github.com
- Write a description (Optional)
- Write a file name including extension. Without extension syntax will not be highlighted.
- Add your code, which you want to post in blogger.
- Now click "Create Public Gist" button.
Saturday, February 25, 2017
Subscribe to:
Posts (Atom)