PC Review


Reply
Thread Tools Rate Thread

C# data access

 
 
douglas
Guest
Posts: n/a
 
      5th Apr 2009
I have a C#.net 2005 dataset in a desktop application does not clear out even
after I do a dispose on the object. What could cause this problem? Ho can I
empty the dataset?

I am writing a desktop windows C#.net 2005 desktop application that
generates one excel spreadsheet per unique customer. I run the dispose method
on the dataset object so that I can obtain the data for the next customer I
will populate data on the next spreadsheet. Howver when I update the data on
a new excel spreadsheet for the next customer, the data from the previous
customer appears on the spreadsheet also.
Thus can you tell me what I can do and/or what I need to check for to make
certain the data from the previous customer in the dataset is cleared out?
 
Reply With Quote
 
 
 
 
Alberto Poblacion
Guest
Posts: n/a
 
      5th Apr 2009
"douglas" <(E-Mail Removed)> wrote in message
news:AA024C1E-B4AA-4B96-BE41-(E-Mail Removed)...
> Thus can you tell me what I can do and/or what I need to check for to
> make
> certain the data from the previous customer in the dataset is cleared out?


The DataSet.Clear() method clears the DataSet of any data by removing all
rows in all tables.

Do NOT perform a Dispose() if you intend to continue accessing your DataSet
object.

 
Reply With Quote
 
douglas
Guest
Posts: n/a
 
      5th Apr 2009
"Alberto Poblacion":

I removed the displose of the datset and only used the clear method. This
solved my problem!
Thank you very much!

"Alberto Poblacion" wrote:

> "douglas" <(E-Mail Removed)> wrote in message
> news:AA024C1E-B4AA-4B96-BE41-(E-Mail Removed)...
> > Thus can you tell me what I can do and/or what I need to check for to
> > make
> > certain the data from the previous customer in the dataset is cleared out?

>
> The DataSet.Clear() method clears the DataSet of any data by removing all
> rows in all tables.
>
> Do NOT perform a Dispose() if you intend to continue accessing your DataSet
> object.
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export Access Data to Excel/Reimport modified data into Access mlloulou Microsoft Access External Data 5 9th Feb 2009 12:09 PM
EXPORT ACCESS DATA AND IMPORT ACCESS DATA Developerme Microsoft Access External Data 3 16th Aug 2008 08:14 PM
The .Net Data OLE DB Provider(System.Data.OleDb) requires Microsoft Data Access Components(MDAC) version 2.6 or later. sanjay prasad Microsoft ADO .NET 1 22nd Sep 2006 01:45 AM
Import Data From Access to Excel - Return Modified Data To Access HVG Microsoft Access External Data 0 9th Dec 2005 08:00 PM
data retrieval through data access pages without access installed =?Utf-8?B?amxhcmNoaWJhbGQ=?= Microsoft Access 0 2nd Dec 2005 11:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:29 AM.