I am finding myself using Delphi again after 5 years out of High school, so I am using your videos to reminisce and to refresh, I am just wondering is it better to use SQL for locating, sorting, filtering etc. or is it better to use the methods you show in your "Databases in Delphi" playlist? What are the pros and cons of each?
I tend to use a bit of both. The SQL purest in me always loves the "clean-ness" of SQL but sometimes the other features are easy. In basic database programs I haven't seen a major difference but it may be for more larger applications. There are also other database connection components in Delphi like FireDAC which more people are moving towards.
@@MrLongITandCAT Thank you. Another question I have is, we were taught/shown how to add/remove records to Access databases from Delphi, but how would I add a new field from Delphi to Access? (To use the tblCD as an example, say I want to add "Year Released" as a field to the database)
@@DanDeDrummer I have never tried that before. I must idea would be to use SQL to add it like I have shown in the Insert, Edit and Delete videos using the ADOQuery component . You could use the following SQL statement: ALTER TABLE tblCD ADD YearReleased int; then run the ExecSQL command on the ADOQuery.
Are you trying to display something in a rich edit or memo control? One of the fields you are trying to display is not a string field (integer or real) so you must convert it using IntToStr or FloatTostr. Example: RedDisplay.Lines.Add( tblStudents['Surname'] + #9 + INTTOSTR( tblStudents['Mark'] ) );
HAAAA SIRR THE U2 JOKE HAS ME IN STITCHES🤣
What do i do if i get an error saying that i "cannot perform this function on a closed dataset" when i run my program
It is probably because the ADOTable is not active. Check out the properties of the ADOTable and see if Active is True.
I am finding myself using Delphi again after 5 years out of High school, so I am using your videos to reminisce and to refresh, I am just wondering is it better to use SQL for locating, sorting, filtering etc. or is it better to use the methods you show in your "Databases in Delphi" playlist? What are the pros and cons of each?
I tend to use a bit of both. The SQL purest in me always loves the "clean-ness" of SQL but sometimes the other features are easy. In basic database programs I haven't seen a major difference but it may be for more larger applications. There are also other database connection components in Delphi like FireDAC which more people are moving towards.
@@MrLongITandCAT Thank you. Another question I have is, we were taught/shown how to add/remove records to Access databases from Delphi, but how would I add a new field from Delphi to Access? (To use the tblCD as an example, say I want to add "Year Released" as a field to the database)
@@DanDeDrummer I have never tried that before. I must idea would be to use SQL to add it like I have shown in the Insert, Edit and Delete videos using the ADOQuery component . You could use the following SQL statement:
ALTER TABLE tblCD
ADD YearReleased int;
then run the ExecSQL command on the ADOQuery.
Afternoon mr.Long, Could you do a video on searching for a record through a date for eg. an finance expenses table with multiple monthly records
Whenever I try this I end up running into a problem. Could not convert variant of type (String) into type (Double)
Are you trying to display something in a rich edit or memo control? One of the fields you are trying to display is not a string field (integer or real) so you must convert it using IntToStr or FloatTostr.
Example:
RedDisplay.Lines.Add( tblStudents['Surname'] + #9 + INTTOSTR( tblStudents['Mark'] ) );
Nice videos it helps a lot, keep it up Sir. 😇
Why not after searching say exit?
It's not good style and you need that flag variable so you can display if you havent found it.
Could you not just say - Exit;
I think you could use Break as Exit would end the procedure
@@josephpereira4368 Brother is doing last minute studying xD