EXEC sp_change_users_login 'Auto_Fix', 'user'
And a small celebration! This is the 100th post :)
param1 = param1 || "my default value";
Update: Fixed typo in the script above (| should have been ||), thanks Nathan for pointing that out! Took the opportunity to add an alternative way to implement below:
param1 = typeof param1 !== 'undefined' ? param1 : "my default value";
When trying to use a class that is outside of the using directives present the editor will display it as an error since it doesn't know of the namespace that the class we want to use.
While standing on the class name, just press CTRL + . (that's holding down CTRL and then .) and you get up the options for which namespace to use. Often just enter is needed to add the preselected.
Among these you can find:
# ASP.NET Code Samples
# Silverlight Code Samples
# Windows Azure Code Samples
# WPF Code Samples
# Windows Forms Code Samples
# Windows 7 Code Samples
# Data Platform Code Samples
# Office Development Code Samples
# Windows Workflow Code Samples
# Interop and Fusion Code Samples
# Windows Base and .NET General Code Samples
# Windows UI Code Samples
# Security Code Samples
# Windows Shell Code Samples
# XML Code Samples
# COM Code Samples
# IPC and RPC Code Samples
# Diagnostics Code Samples
# Visual Studio Extensibility Code Samples
# File System Code Samples
# IIS Code Samples
# Windows Service Code Samples
You'll find the samples in the All-In-One Code Framework Sample Catalog.
Or why not download the complete library?
FROM DISK = N'c:\temp\dbMyDatabase.bak'
If this doesn't work you're probebly trying to run it on an older SQL Server version than the backup was taken from.
Unfortunately I haven't found a proper lookup table to translate the version number to SQL Server version, but here's two:
611 = SQL Server 2005
655 = SQL Server 2008
If you find a good resource for version lookup, please post it in the comments, thanks!