我的大脑已经死了!!!!! 我修改了DataTable中的单行通过将 特定行中的FirstName列设置为另一个名字。 (没有接受更改)。 但是,这个语句仍然会返回带有''New Value in it'的行。 不应该是之前的值我做了改变或者我错过了 的东西。 r = Ds1.Tables(0).Select(Nothing,Nothing,DataViewRowState.OriginalRows) - OHM(特里伯恩斯) 。 。 。单手人。 。 当你不知道自己在做什么时,过得很快
解决方案你好特里, 你知道这个页面吗? msdn.microsoft/library/de...ClassTopic.asp Cor
是的,我知道这个页面,但是,这是指另一种方法 ,它使用DataView类来过滤输出。 当使用DataTable的.Select方法时,这似乎给出了奇怪的 结果。 试试吧,让我知道。 - OHM(特里烧伤) 。 。 。单手人。 。 当你不知道自己在做什么时,过得很快 Cor Ligthert <无********** @ planet.nl>在消息中写道 新闻:%2 *************** @ TK2MSFTNGP11.phx.gbl ... 嗨特里, 你知道这个页面吗? msdn.microsoft/library/de...ClassTopic.asp Cor
select方法似乎有一个bug,但是,使用 StateFiltering的devault视图,这没问题。 Ds1.Tables(0).DefaultView.RowStateFilter = CType(ComboBox1.SelectedItem, State).MyState Dim i As Integer For i = 0 To Ds1.Tables(0).DefaultView.Count - 1 txtConsole.AppendText(Ds1.Tables(0).DefaultView.It em(i)(" FirstName")& (Microsoft.VisualBasic.vbCrLf)) 下一页 - OHM(特里伯恩斯) 。 。 。单手人。 。 当你不知道自己在做什么的时候过得很快 一个男人(OHM - 特里伯恩斯) )" < news.microsoft>在消息中写道 news:%2 ****************** @ TK2MSFTNGP11.phx.gbl ... 是的,我知道这个页面,但是,这是指一种不同的方法,它使用DataView类来过滤输出。 当使用DataTable的.Select方法时,这似乎给出了奇怪的结果。 尝试并让我知道。 - OHM(特里伯恩斯) )。 。 。单手人。 。 当你不知道自己在做什么时,过得很快 Cor Ligthert <无********** @ planet.nl>在消息中写道新闻:%2 *************** @ TK2MSFTNGP11.phx.gbl ... 嗨特里, 你知道这个页面吗?
msdn.microsoft/library/de...ClassTopic.asp
blockquote>
My Brain is dead !!!!! I modify a single row in a DataTable By setting the FirstName column in a specific row to another name. ( Without Accepting Changes ). However, this statement still returns the rows with the ''New Value in it'' shouldnt it be the values before I made the change or have I missed something. r = Ds1.Tables(0).Select(Nothing, Nothing, DataViewRowState.OriginalRows) -- OHM ( Terry Burns ) . . . One-Handed-Man . . . Time flies when you don''t know what you''re doing
解决方案 Hi Terry, You know this page? msdn.microsoft/library/de...ClassTopic.asp CorYes, I''m aware of this page, however, this refers to a different method which uses a DataView class to filter the output. When using the .Select method of a DataTable, this appears to give strange results. Try it and let me know., -- OHM ( Terry Burns ) . . . One-Handed-Man . . . Time flies when you don''t know what you''re doing "Cor Ligthert" <no**********@planet.nl> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl... Hi Terry, You know this page? msdn.microsoft/library/de...ClassTopic.asp CorThe select method seems to have a bug in it, however, using the StateFiltering of the devault view, this works no problem. Ds1.Tables(0).DefaultView.RowStateFilter = CType(ComboBox1.SelectedItem, State).MyState Dim i As Integer For i = 0 To Ds1.Tables(0).DefaultView.Count - 1 txtConsole.AppendText(Ds1.Tables(0).DefaultView.It em(i)("FirstName") & (Microsoft.VisualBasic.vbCrLf)) Next -- OHM ( Terry Burns ) . . . One-Handed-Man . . . Time flies when you don''t know what you''re doing "One Handed Man ( OHM - Terry Burns )" <news.microsoft> wrote in message news:%2******************@TK2MSFTNGP11.phx.gbl... Yes, I''m aware of this page, however, this refers to a different method which uses a DataView class to filter the output. When using the .Select method of a DataTable, this appears to give strange results. Try it and let me know., -- OHM ( Terry Burns ) . . . One-Handed-Man . . . Time flies when you don''t know what you''re doing "Cor Ligthert" <no**********@planet.nl> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl... Hi Terry, You know this page?msdn.microsoft/library/de...ClassTopic.asp
Cor更多推荐
原始行
发布评论