English 中文(简体)
在记录从反面数据表消失时从数据表中删除记录
原标题:Remove record from a datatable when record disappears from a mirrored datatable

我有两个对应数据表(两个主要钥匙的类似结构):

  • DataTable_A ---> bound to a datagridView
  • DataTable_B ---> filled from a database

自数据表以来 B每2秒用一个电线填入数据库,我需要反映数据表——如数据表 B 避免直接填充数据表A。 如果记录从数据表B消失,需要从数据表A中删除记录。 这样做的最佳途径是什么?

现在,我正在各行各式各行各式各式各式各式各式各式各式各样: B和如果在数据表A上存在斜线,我删除。

是否有更好的办法去做?

最佳回答

最好的方式不是要有一个表A,而是使用表B的数据。 这将一劳永逸地解决所有问题。 您能详细说明为什么需要复制?

但否则,你将想处理。 RowChanged and Table NewRow 表B


更一般性的想法,在看到你的意见后: 如果有可能在数据库中表格中增加一个时间段栏,那么你可以进行更有效的查询。 和数据。 中间商法将替代物。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签