Author Archives: calvin998

Crosstab Query (3)

DECLARE @Names VARCHAR(8000) SELECT @Names = COALESCE(@Names + ‘, ‘, ”) + Name FROM People SELECT @Names Or this post about FOR XML PATH http://stackoverflow.com/questions/194852/concatenate-many-rows-into-a-single-text-string Advertisements

Posted in SQL | Leave a comment

Southern California .NET user groups

Orange County Master Calendar of many developer user groups in the OC and in San Diego – http://www.socaldotnet.org/ V_Next Orange County – http://www.meetup.com/vNext-OrangeCounty/ XPSoCal (Agile) – http://tech.groups.yahoo.com/group/xpsocal/ Orange County .NET User Group — http://www.ocdotnet.org Orange County Android UG – http://www.meetup.com/OCAndroid/Continue reading

Posted in Uncategorized | Leave a comment

Injecting Values for Default MVC Model Binding

In a recent project, due to security concerns, we want to encrypt all QueryString values into a single encrypted value before placing the link in web pages, then decrypt it back to individual name/value pairs and pass them to default … Continue reading

Posted in ASP.NET, MVC | Tagged , | Leave a comment

SET NUMERIC_ROUNDABORT ON and others

A good link: http://sqlservercode.blogspot.com/2006/11/use-sessionproperty-to-check-if.html Useful commands: DBCC USEROPTIONS SELECT SESSIONPROPERTY(‘numeric_roundabort’) NUMERIC_ROUNDABORT seems is a server level (or user session level) setting. Because when I change it on one DB, all other DBs are changed too. If use Visual Studio Database project, make … Continue reading

Posted in SQL | Tagged | Leave a comment

Why the view doesn’t display the new values set in the post back method

In MVC, when you post back any changes, it’s recommended that you follow the PRG (Post-Redirect-Get) pattern to the View page. However, if you want to display the same model data back in the same request, there might be something … Continue reading

Posted in MVC | Tagged | Leave a comment

TFS – “The path … is already mapped in workspace …”

After installing some power too, my VS 2010 now always run under another admin account of me. So my previous mapping of the projects are lost and I can’t check out files to the original local path. The above error … Continue reading

Posted in Tools | Tagged | Leave a comment

SQL command always times out after 30 seconds

One of my query takes more than 30 seconds to run. Even I set the “Connection Timeout=120” in my connection string, it still throwing timed out exception. It turned out that the time out setting in the connection string is … Continue reading

Posted in .NET, SQL | Tagged | Leave a comment