Topic: Some issues with my very first project
Here is attached my very first project. Hopefully, it is not the last one.
I am trying to make a simple database for storing of few text info along with picture and attached files (for each record) but in separate files called “storage” and “gallery” following the lot of examples, tips and instructions from this forum (in English and Russian language).
I’ve been struggling with this for over a month but I still haven’t been able to do it the right way.
There are a some issues I can't solve and professional help will be very appreciated.
1.- From the very beginning, problems with storing and deleting files into and out of "storage" and "gallery" occasionally occur. For example, it happens Form2 shows no photo in picturebox and / or no attachment in DBFile1 even though they still exist in storage and gallery. The opposite happens too, ie the picturebox and DBFile1 show attached files even though they are not in the storage and gallery (somehow are deleted). Also, very often if I change the photo in picturebox, the old photo still exist in gallery (it is not deleted).
2.- I tried to make limit of records in TableGrid with this code:
procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
if form1.tablegrid1.rowcount >= 10 then form3.show else form2.show;
end;
At the same time I changed the Properties and Events of "Add" button to "no action" and "Form1 Button1 OnClick". It seems to me it is working but the new problem arrives. When I click the Add button, the form opens but with no empty fields. The fields are filled with the previous record.
3.- I have a DateTimePicker in Form2 that should be included and visible in TableGrid1 and print report too.
Report printing in both cases seems to be OK (Printing one record or printing all the records). Only the Recorded Date is missing in print report, because is missing in TableGrid1 too.
I rely on the help of Derek and other experts from this forum.
Thanks in advance.