If you need to reset the identity seed after deleting a record/records, you can use the following statement where the last INT value ( eg: 20 below), stands for the row from which you want to reseed from. This would be the last row in the table after deleting the records you want to.
DBCC CHECKIDENT ('Tablename', RESEED, 20);
GO
Once you run this, the next entered column will have the identity value ’21’
You can suppress the message in the source or add the message to a suppression file from the ‘Error List’ tab, right-click the message and do as shown below:
Even if you add the setting to start VS2017 as ad Administrator, it doesn’t do that when accessing solutions from the jump list. To get that going, you need to add a registry key, which is fairly straightforward.
Due to WordPress security reasons, I can’t upload the file here, so just go ahead and create a Registration Entries file (.reg) using the content below and run it as admin… simple!
NOTE: For x64 and other versions of Visual Studio, modify the path name accordingly.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\Common7\\IDE\\devenv.exe"="~ RUNASADMIN"
This came in handy when I had to find all the tables in a database that had ‘varbinary’ datatype columns. You can replace the ‘varbinary’ text to find any type you are looking for.
SELECT
table_name [Table Name], column_name [Column Name]
FROM
information_schema.columns
WHERE
DATA_TYPE = 'varbinary'
If you face a problem where, as soon as you click on the button for a modal popup, the modal fades in and then immediately disappears, then the problem is because this is typical behaviour for loading the Modal plugin JavaScript twice. Please check to make sure that you have either bootstrap.js OR bootstrap-modal.js, but not both. The former includes the latter.
To create a shutdown timer manually, open Command Prompt and type the command shutdown -s -t XXXX. The “XXXX” should be the time in seconds you want to elapse before the computer shuts down. For instance, if you want the computer to shut down in 2 hours, the command should look like shutdown -s -t 7200.
If you want to restart your computer on a delay, use shutdown -r -t XXXX instead.
To cancel the timer, open the Run window or Command Prompt again and enter shutdown -a.
Create a shutdown timer shortcut
If you need to use a shutdown timer regularly, you can take this trick one step further by turning it into a desktop shortcut.
Right-click on the desktop, hover over New and select Shortcut in the side menu.
In the path field type “shutdown -s -t XXXX” and click Next.
Enter a name for the shortcut (for example, “Shutdown 1 Hour”) and click Finish.
Any time you double-click the shutdown shortcut, the timer will start. To cancel the timer, you can create a second shortcut using shutdown -a or enter the shutdown -a command in Command Prompt.
To change the time on the shutdown timer, right-click the shortcut icon, select Properties and change the seconds value in the Target field. From within Properties, you can also assign a different image as the icon.