DataTable Failed to enable constraints error

Recently I constantly encountered ‘Failed to Enable constraints…’ error when working with DataTables. .Net doesn’t provide any detailed information for this error.
This error might be due to
a) Query columns and Fill method columns mismatch
b) Column maxlength exceeded
c) Duplicate rows(when some join)
d) some other when loading data into the DataTable.

Read more

Adding JScript Intellisense in VS2008 for External files

“Reference” comment in the JS file allows you to see JScript functions and objects from any external file whether it could be an another JS file or a web page or a web service or even an embedded resource.

The common usage is

[code:c#]

///<reference path=”path of webservice or jsfile or webpage” />

[/code]

or

[code:c#]

///<reference name=”resource-name” assembly=”assembly-name” />

[/code]

Example:

To reference Ajax library

[code:c#]

/// <reference name="MicrosoftAjax.js"/>

[/code]

 

Happy coding…