Knowledge Transfer

Sunday, October 10, 2010

Export data from dataset to excel with more than 65000 records with multiple excel sheets in asp.net

Hi ,

Please check below links for exporting data from dataset to excel with multiple excel sheets in asp.net .

http://www.codeproject.com/KB/office/OutputDatasetToExcel.aspx (This link is working fine but it is accept only 65000 records but excel 2007 it is open the 10 lac records per sheet)


another one if you fine tune that code then we achive the multiple sheets in excel with number of rows.

http://www.codeproject.com/KB/office/ExportDataSetToExcel.aspx

Regards,
Uday

Labels: , ,

Monday, July 5, 2010

A Step-by-Step Approach to Creating a Web Service Task Using SQL Server Integration Services

Hello DotNetgems/SSIS Guys,

Web Services and SOA are assuming greater importance in the IT strategy of businesses. This tutorial describes a step-by-step method to create a SSIS package containing a web service task. The web service used in the tutorial will be discussed first. This will be followed by describing how the package is configured using the Visual Studio 2005 IDE.

Click Here for more info

Regards,
Uday

Labels: , , ,

Sunday, June 20, 2010

WPF Examples for .Net 4.0

WPF Examples for .Net 4.0

please check here for WPF and some more .Net 4.0 concepts.

http://windowsclient.net/wpf/


http://msdn.microsoft.com/en-us/library/aa970268.aspx


Happy Coding

Labels: , , ,

Saturday, June 12, 2010

what is Strong reference and Weak reference?

Just to refresh our minds about strong references before starting to talk about weak references.A reference pointing to an object created by the new operator is called a Strong Reference and as long as this reference is still pointing to that object it will reside in memory. However, if a weak reference points to an object it gets collected by the garbage collector as soon as more memory is in need.

When to use Weak references?

For example, if you have data (not critical for your application) to be retrieved from an xml file, text file, or even a data source then you could use a weak reference. Even if it get collected by the garbage collector you can still re-process the data.

Below is a sample code to get a weak reference out of a strong one.

// Create new strong reference to an object
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
// Load the xml into that object
doc.Load(Server.MapPath("~/test.xml"));
// Create weak reference out of doc object
WeakReference docWeakRef = new WeakReference(doc);
// Set the doc object to null;
doc = null;

Now you can still get the strong reference to that object before using

docWeakRef.Target // which returns a strong reference to the weak object


Just remember before using the object always check the Target property if it is null then the object has been collected by the garbage collector and of course removed from the memory.

Regards,
Udayabhaskar