//Cloud notes from my desk -Maheshk

"Fortunate are those who take the first steps.” ― Paulo Coelho

I will be there @ MS Tech-ed 2009, HYD

 3468269248_5abcb110db 3468269218_9cbf4b3759

2009-05-10 Posted by | Uncategorized | Leave a comment

Why I should not use DataTable.Select() for larger set of records

Reason : Performance degrade
How      : Select() takes arbitary criteria, returns an array of DataRows (Row Collection).  It has to walk thru the entire table and compare every record to the criteria that you passed in. It is
considered worst method to use for large set of records.

So here is the alternative,

1) DataTable.Rows.Find if you look for single row…
2) Indexing the DataTable..but need to build Index in .NET Code as well.
3) LINQ – recommended
4) Morphing the DataTable into a generic collection like Dictionary(Of String, String) to hold the same data as the DataTable.

Src : Scaling ADO.NET DataTables and Best Practices for Using ADO.NET

2009-05-06 Posted by | .NET General | Leave a comment

Cannot load file..another DLL Hell

I got Visual Web Dev Express 2008 for my day job ( Angry because it is free know ), when I tried to create a connection through SQL Datasource or Entity Model or LINQ or any means through editor, I get the below error saying, but no clue..but luckily google saved my time.

"Could not load file or assembly ‘Microsoft.SqlServer.Management.Sdk.Sfc, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified."

The quick fix is, download the below 3 setup and install to get rid of this error.

            Microsoft SQL Server System CLR Types
            Microsoft SQL Server 2008 Management Objects
            Microsoft SQL Server 2008 Native Client

Download –http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en#filelist

2009-05-06 Posted by | SQL SERVER - My Own code | Leave a comment


%d bloggers like this: