August 2010
12 posts
1 tag
Reseeding MSSQL Autoincrement Identity Column
Our DBA migrated one of our databases last week. For some reason now, when I tried to add a row to a table in one of our tables, I received a primary key constraint violation error.
I learned how to check what’s current auto-increment value of the primary key column and how to change it with a couple of quick queries…
To see the current seed (auto-incrementing value):
DBCC...
The darker it is the brighter light shines.
They’re alive!
and scrumptious…
China Trip Pics →
VS2010 HotFix for Search dialog box stretching →
Whoever can be trusted with very little can also be trusted with much, and...
– Luke 16:10
If you do not know the truth, you can not recognize a lie.
– Joyce Meyer (on the importance of knowing the Word of God)
They think somebody should do something, but it never occurs to them that it...
– Joyce Meyers (on passiveness in How to Build a Fortress of Faith - Part 1 podcast)
3 tags
Convert QueryString to Dictionary
Snippet
public static Dictionary<string, object> QuerystringToDictionary(NameValueCollection QueryString) { Dictionary<string, object> routeValues = new Dictionary<string, object>(); foreach (string key in QueryString.Keys) { routeValues[key] = QueryString[key].ToString(); } return routeValues; }
3 tags
Gotcha
When creating custom Html Helpers in MVC 2 and .Net 4.0 remember to make the return type MvcHtmlString, because if you make it simply string (as I had in a MVC 1.0 project that I migrated to MVC 2 and .Net 4.0) and you use the Html encoding syntax (<%:), it’ll encode your output.
2 tags
HotFix for "Insufficient available memory to meet... →