Winan,
There's nothing wrong with using a DataSet.Clear() and DataAdapter.Fill() to re-fill it, but I'm a little unclear as to where the data is coming from ... I haven't done serial communication with .NET.
Does the DataAdapter handle getting data from a serial port? If so, I don't understand why you've asked this question.
If not, then perhaps you've taken the data from the serial port, updated your database with it, and then you're getting the data back from the database in order to put it in a DataSet? If so, then why don't you just put it into a DataSet to begin with (manually populate the DataSet)? That would be better.
~~Bonnie
>Dear The Expert,
>I am creating a serial communication application by using vb.net, after the data received then they will be proceed and then show on the datagrid, I show them by using below commands:
>
>mydataset.clear
>mydataadapter.fill(mydataset)
>
>the above commands will clear all contents in mydataset and then refill, I think this will takes a lot of resources. is there another way for doing this?
>
>Thanks
>
>Winanjaya