Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm writing a windows service that periodically goes out to a SQL table and checks it for new records. I connect ok and fill the dataset ok, but how do I clear the dataset once I'm done with it? What's happening is that evertime the service goes to check the table, it fills the dataset, appending from the end. So if I start with 2 new records in the dataset, at the next check the dataset will have 4, then 6, etc.

 

I've tried using dataset.clear and dataset.Tables("tablename").Rows.Clear(), but neither seems to work.

 

Any clues or ideas?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...