What Was I Thinking?

Follies & Foils of .NET Development
posts - 95 , comments - 352 , trackbacks - 0

September 2012 Entries

Convert VARCHAR() columns to NVARCHAR()
We recently underwent an upgrade that required us to change our database columns from varchar to NVarchar, to support unicode characters. Digging through the internet, I found a base script which I modified to handle reserved word table names, and maintain the NULL/NotNull constraint of the columns. I Ran this script use NWOperationalContent – Your Catalog Name here GO SELECT 'ALTER TABLE ' + isnull(schema_name(syo.id), 'dbo') + '.[' + syo.name +'] ' + ' ALTER COLUMN [' + syc.name + '] NVARCHAR(' ......

Posted On Wednesday, September 26, 2012 6:46 PM | Comments (1) | Filed Under [ SQL ]

Solved: Operation is not valid due to the current state of the object
We use public static methods decorated with [WebMethod] to support our Ajax Postbacks. Recently, I received an error from a UI developing stating he was receiving the following error when attempting his post back: { "Message": "Operation is not valid due to the current state of the object.", "StackTrace": " at System.Web.Script.Serializa... dictionary, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n ......

Posted On Thursday, September 6, 2012 2:05 PM | Comments (0) |

Powered by: