With H2O, it's easy to create tables in your database and H2O Forms associated with the tables to provide a visual interface for interacting with the data in that table. 

By clicking the Create New SQL H2O Form icon as indicated in the image to the right, you can...
  • Create new tables
  • Create new forms over your new tables
  • Create new forms from existing tables in your database
  • Add/Remove fields from tables

 

It is very important to be very careful when using this feature.  Altering tables that belong to other modules or DotNetNuke Framework could cause serious problems for your web site.

How to create a new form from an existing table:

  1. Select the table from the Table Name list.  This list contains a list of all tables in your DotNetNuke database. If the table is in another database on the same SQL Server, you will need to fully qualify the table.  For example, if want to connect to a table named Orders in your Sales database, then you should type Sales.dbo.Orders into the Table Name drop down box.
  2. If you want to modify any of the fields, click the Refresh List link as shown in the image above. Then select the column from the drop down box below it to modify the field.
  3. Type a name for your new form in the Form Name field
  4. Change the Author if necessary by entering your name into the Author field.
  5. Provide a description for your form into the Form Description text box
  6. Type the Primary Key of your table into the Primary Key text box.  It is critical that you provide this information in order to synchronize data entered into your form or directly into the table with H2O.
  7. Click the Create New Form link

After you click the Create New Form link, you will see the success message and your form will now be visible in the forms list in the H2O Forms Designer.

How to create a new form from a new table:
  1. Type the name of your new table into the Table Name drop down box
  2. Click the Create New Table link.  A message will then appear indicating the table has been created (as shown in the image to the right).  You will also notice that the Primary Key field has been pre-filled for you with the name of the primary key H2O created for your new form.
  3. Next, you need to add columns to your table. To add fields...
    1. Type the name of the field into the Field Name text box
    2. Select the data type for this new field from the Set Data Type drop down box.
    3. Click Add Field
    4. Repeat for each column
  4. You are now ready to move onto step 2 of this process by entering in the H2O Form information as described above in the "How to create a new form from an existing table" listing to complete your form.

After you have successfully created your table and your new H2O form, you can edit the controls and the layout using the H2O Forms Designer.  Since your form is associated with a table in your database, you will notice new options in the Form Detail screen of your new form.  To view these new options, click on the Edit link in the Forms List to open the Detail Screen.  Below is a screen shot of what this screen would look like after creating a new table and H2O Form.



Copyright 2009 by OnyakTech
Privacy StatementTerms Of Use