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,
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.
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
Cannot load file..another DLL Hell
I got Visual Web Dev Express 2008 for my day job ( 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=10.0.0.0, 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
-
Recent
- The ID token is not yet valid. Make sure your computer’s time and time zone are both correct. Current epoch = 1689517128
- .NET Core – How to create a .NET GUI app which runs across the platform
- AKS 2022 updates
- Linux firewall and connectivity issues
- Microsoft Ignite (Sep22-24) event recap & On-demand sessions
- [Linux] Steps to install and configure sysstat package for monitoring.
- Azure Security Enablement – Centralized place for all the links
- Presenting tech session with stories [linkedin learning notes]
- gRPC using .NET core notes
- .NET in 2020 (Build recap)
- #KubeCon CNCF – North America 2019 watchlist
- AKS CLI Sheetcheat for the labs
-
Links