|
I have encountered the following problems for beginners, please help me master! Thank you! delphi + sql
I make a purchase order for invoicing. The purchase order is divided into main form and detailed form. Now when adding the details, we need to build a temporary table to ensure that there are no duplicates in the temporary table. However, no temporary table will be built, and I don't know how to deal with it. Are there any better solutions for you?
Master table (jh_master (dh single number (primary key), ghs supplier, jhdate purchase date))
List (jh_detail (dh single number (primary key), spno product number (primary key), qty quantity))
Now enter the page first to add the main table information, add multiple details, use adoquery.append to add. But because my dbgrid settings are not automatically saved in the database, I have to wait until saving before adoquery.updatebatch saves. To prevent product numbers from being duplicated in the same document. What should i do note. At adoquery.append, the data is not stored in the database, so you cannot check for duplicates. Every time I think about building a temporary table, I won't. What to do! |
|