clearing and replacing data in a datatable

B

Bernie Yaeger

I first load a small amount of data into a dataset with
da.fill(ds,"customers")

Later, I want to change that data based on user input:

Me.da.SelectCommand.CommandText = "select ptype, posstatus, shipdt, bipad,
issuecode, brname, imcacct, draw, preturn, rreturn, shortage, uprice, net,
efficiency from histd where custid = " & Chr(39) & mcustid & Chr(39)

How do I clear out the first datatable in the ds and replace it with this
new command? I don't want to create a second datatable, which I know how to
do.

Thanks for any help.

Bernie Yaeger
 
V

Visual Barty

Bernie -

The dataset has a clear method that will clear all of the tables in the
dataset, I think that it will work for you.

Code snippet: ds.Clear()

Hope this helps.

Bart A. Robinson, MCP
 
B

Bernie Yaeger

Hi Bart,

Tx - that did it!

Bernie
Visual Barty said:
Bernie -

The dataset has a clear method that will clear all of the tables in the
dataset, I think that it will work for you.

Code snippet: ds.Clear()

Hope this helps.

Bart A. Robinson, MCP


how
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top