Bug (2)

xiaoxiao2021-03-06  50

Due to the changes in the "Column Structure Management" part, today has to turn the previous code to change it. The changed code is always bug, the more, the new function is implemented, but unstable, always in some cases.

After an hour of repeated experiment, the problem was found on the DataT. Dizziness, it is it ...

Still old, single-step execution, although this method is very easy to use, basic bug can be found, but the whole god is staring at the display, it is not as cool as staring at the beauty, the code that ants comrades is not so attractive - -

Sure enough, I didn't see anything, just proved that three mistakes will happen in this case. Hey ~ It seems that today is not Debug's days, so I fell asleep on the table. ZZZZZ ....

I am awakened to find that it is already a meal time. "No, you can't do anything, don't do it, how to get the rice flower?" I finally found it, reopen Visual Studio, I must set bugs.

I slept, I found out the problem, I found a problem over again.

A table with only one line: TTable.Rows.count == 1

I deleted a line: ttable.rows [0] .delete ();

The number of lines is still 1: TTable.Rows.count == 1

Is it a bug in the DataRow class? People are always like this, and the problem is always looking for someone else. I don't know how to go, I have thought of Bill Gates, and there is a resentment in his respect and disgusting feelings! BUG is always endless ...

It is always necessary to say that it is always doing, and Debug always has to continue.

I ran a few times, the same result, but I was helpless. Citing it, if it is DATAROW.

Del

If the eTe () function has a problem, should I look at this function? So I launched all the properties of the DataRow, which attributes have changed when the DELETE function is changed.

Sure enough, many attributes have been changed, such as DataRow.itemarray is cleared, that is, the data of this line does not exist, but why doesn't it delete rows? I suddenly thought of this, Dataset is supported by the backup operation. Is it doing this to do this?

Look down, there is a attribute to attract me, ROWSTATE == deleted. I suddenly became very excited, and I ran again and carefully observed the change of ROWSTATE and found that call DATAROW.

Del

After ete (), ROWSTATE has become deleted from unchanged.

It's really that Huang Tian does not have a heart, and it has set a hidden bug. Now I can use TTable.Rows [0] .rowstate to judge without ttable.rows.count.

It seems that the foundation is not solid, and the fast food eaten. Net is really uncomfortable, and many underlying things don't know, I have to take a book.

DEBUG is the same as the contradiction in love, often no one is wrong, the wrong is not understanding each other.

转载请注明原文地址:https://www.9cbs.com/read-83388.html

New Post(0)