Filter the field (C ++) in another table in a table

xiaoxiao2021-03-06  42

Filter the field in another table from a table. [2004-12-4] [from this site original]

The implementation of the goal is to compare from a field and another field of a table and another table. If the same field is deleted .EDit1-> Text is entering one want to take To make a comparison table name edit3-> text is the same word count Memo1 to identify the same word, to identify the wrong orientation1 point to the table adotable2 to operate, pointing to the initial way of writing to compare Yes: void __fastcall tform1 :: Button1click (TOBJECT * Sender) {adotable1-> close (); adotable2-> close (); adotable2-> TableName = Edit1-> text; Form1-> CAPTION = "Detect Table" Edit1 -> text; int aa = 0; adotable1-> open (); adotable2-> open (); int Ii = adotable1-> recordcount; int j = adotable2-> recordcount; adotable1-> first (); adotable2-> first (); For (int I11 = 1; i11 <= II; I11 ) {adotable1-> recno = i11; refresh (); for (int i31 = 1; i31 <= ij; i31 ) {adotable2-> recno = i31 ; Refresh (); if (adotable1-> fieldbyName) -> asstring == adotable2-> FieldByName ("English") -> asstring) {refresh (); aa == aa ; edit3-> text = INTOS Tr (aa); mempo1-> lines-> append (adotable1-> fieldbyname) -> asstring); memo1-> lines-> append (adotable2-> fieldbyname ("English) -> asstring); adotable1 -> delete (); break;} else {}}} form1-> caption = edit1-> text "table detection end ....";} Problem analysis: Re-executing will also find the same field, this The filter is not clean and thorough, and I want to break the head and finally come up with the most reasonable explanation. When deleting the data, it is to execute adotable1-> delete ();

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

New Post(0)