开发者

VB.NET DataSet doesn't clear

开发者 https://www.devze.com 2023-04-13 06:38 出处:网络
I\'m using the MYSQL .NET connector with an adapter to fill a dataset from a SELECT 开发者_如何学编程statement. Between different SELECT statements I use the DataSet.Clear() function. The Getxml shows

I'm using the MYSQL .NET connector with an adapter to fill a dataset from a SELECT 开发者_如何学编程statement. Between different SELECT statements I use the DataSet.Clear() function. The Getxml shows me that the dataset is empty, however when cycling through the Table's columns, I have all the columns from all the tables used in prior SELECT statements.

How do I go about that without Dimming new Datasets for each table?


Remove the DataTables from the DataSet as so:

ds.Tables.Clear();

This will remove the DataTables in the collection. DataSet.Clear() removes the rows from all the DataTables in the DataSet

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号