Greetings, use you can use both. But just remember if you are using a DBGrid, only one is connected via the data source. So if you are using the adotable data source a DBGrid to show the data and you now move to SQL, you must change the data source of the dbGrid to the datasource for the adoquery
You first delete the data in the child table (the one where the data has a foreign key). And then you delete the data in the main table (that refers to the primary key).
Hi Mr Long. Back again with yet another question. I have a SQLIte database of employees which has a RecNo field set to Auto Increment. One of the fields in that DB is STATUS and it will show if the employee is ACTIVE, still with the company, or RESIGNED. I've written a procedure that runs through the entire DB and moves any employees whose STATUS = RESIGNED to a PASTEMPLOYEES Table and then DELETED them from the Main Table. The RecNo is just that. It's not an I.D. so what I want to do now is reorder the RecNo value so there are no breaks like 100, 101, 103, 105. Appreciate any help you can provide..
If it's not a primary key field you could just loop through the table and reassign the values in numerical sequence: for K := 1 to adoTable.recordcount do adotable['RecNo'] := K ;