Topic: Button action vs Pascal Scripting

Hello,
I like MVD a great deal and am considering the way forward to maximise software development. I currently use button actions for everything and write small amounts of code on other buttons and on forms opening, that sort of thing. However I think I must be significantly better off learning to take care of these things by writing the code myself and that will give me more flexibility. So there are a couple of questions.
1. Should I be looking at learning the SQL language for record related tasks (add, delete, etc).
2. If I use scripting instead of actions, does the relations set up in creating the data files still apply such as cascade delete and update.
3. Is there a recommended web site that can teach me what I need for learning the scripting mentioned here.
Thanks in advance for any help, David.

Re: Button action vs Pascal Scripting

Hello,


1. Here you can find some info for beginners about SQL and databases
http://myvisualdatabase.com/forum/viewtopic.php?id=986


2. Yes.


3. Script language is Object Pascal (Delphi), so you can read any book about Delphi

Dmitry.

Re: Button action vs Pascal Scripting

Thank you Dmitry, enjoy your vacation. I have started going through the material you mention.
Can someone tell me please just how to start. I have a table and just want to have a button to press and it will display a form. I can write Pascal to open a form with the edit boxes for fields displayed. Then I would like a save button. I can't see a Pascal command to write the form data to a new record or to edit an existing one so I am not sure if I am to use Pascal or SQL at that point. Does anybody know if there is a really simple demo application with add, edit, and delete a record, just by using code (no button actions). That would really help me to get started. I'm sure once I get going I will be okay but struggling at the moment.
Thanks for any help offered. David.

Re: Button action vs Pascal Scripting

I would suggest to first learn about SQL language. It is not very complex but you really have to understand it first to avoid a big mess later on.

Re: Button action vs Pascal Scripting

Hello tcoton, yes I have started SQL today. Managed to be able to add a record using

SQLExecute ('INSERT INTO MySQLContacts (Name,Phone) VALUES ('+ frmContact.Edit1.sqlValue +','+ frmContact.Edit2.sqlValue +')');
    frmMain.TableGrid1.dbUpdate;
    frmContact.Close;

attached to a new record button. After adding a record, once I click it again the fields are pre-populated with the values from the last entered record so I must need to clear these fields in the code above just before the frmContact.Close;

Thanks for your help, David.