We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Sending Data from Sql Data reader to Excel sheet as a (Snapshot) without looping Statement

Thread ID:




26872 Apr 2,2005 11:11 AM UTC WinForms 0
Tags: XlsIO
Mohammad Abdullah
Asked On April 2, 2005 11:11 AM UTC

Hi , I have a windows C#.Net application , this application want to send a data that get it from Sql data reader into a grid but without a looping e.g.: int i=1; Region.Parameters["@iRegion"].Value=i; SqlDataReader Dr = Region.ExecuteReader(); //Loop process //read the current record //Put each field on the appropriate grid cell //go to next record on the data reader //End loop I''m Using Sql server 2000 as a database and suppose the data reader gets about 10,000 records this is not accepted for the user because it will do more response time, so I want a method that sends the data to : 1- I want to take this data to an Excel file with the same way that done with the grid , but first It should check if there is a previous data available at the Excel sheet if there is a data then , it should remove it first then send the new data to the Excel sheet. If this possible only through (DTS) how I do this by C# code based on the information that comes from Data reader on the Upper Example? 2-IF the looping is Must I heared that there is a methods called (Beginupdate,Endupdate) How I use this methods , explain by peace of C# code. Thanks


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon