Saving information to your Database

 

Saving information to your database is very similar to extracting data from it, and just like pulling data from your database there are 2 ways to do it. The first is the Data form Wizard which can be used when you create a new page to your project, the second is the "Save Record" in the action builder.

First we will look at the Data Form Wizard, when you select to add a new page to your project you will find this under Wizards. As always the wizard is easy to use and just asks you to select what fields in the database to use.

A nice feature of this wizard is the "populate form fields" if you select this the page will allow you to view existing data and make changes, edit, delete or add new. Ideal for a Admin page.

When you Finish your new page will be created ready for you to give it your own design or if you have set up an external editor in option you can open the page in your favorite editor and when you save it from there it will be brought back in to easyGen with your new look.

Save Record Action 

If you have an existing page, i.e. one imported from your current web site, you can use the "Save record" action in the Action Builder

First add a "FORM" from the Toolbox on the page where you want to allow user input, then the entry fields and then a save button (all these must be within the form. You can also rename the text on the save button in the Properties, just click on the submit button, go to Properties <INPUT> tab next to the Action Builder tab and change its name in Value, it will already be called "Submit Query" but you can call it anything you like, i.e. "Join" or "enter" whatever you feel is appropriate.

 By default the form is set to "POST" you can read more about data transfer types here but if you want to change this select the form by click on something within it then click on <form> in the bottom right hand corner or the page editor.

However, in this instance we will leave the defaults as is, next we use the Save Record action in the Action Builder, and use the wizard to tell the page where you want the data to be stored. When using a Form like this the default action is set to POST, so when getting values for the save record action you also choose POST, then the drop down will populate with a choice of post data you can select from.

Using these instructions build your own basic page, don't worry about design, just use the wizards and action to see how they work, because it is so fast and easy with easyGen, you can make mistakes and not worry about how much time it's taking. You can always refer back to these help files if you need to, we will also be adding new information and help files which you can access via easyGen by clicking on "Resources" from the easyGen Start Page.

To learn about data transfer types click here