Database Solution Generator
The Database Solution Generator is one of the most powerful features of ASP Express. With the DSG, you can create a two page 'Total Database Solution' for your database table. Available Databases are MS Access and SQL Server. The DSG is located in the Tools menu, and can be accessed with Alt-F12.

In the first dialog that pops up, when accessing the DSG, we create the initial settings for the pages to be created. If a default 'Working Directory' is saved in the Startup 1 tab of the Preferences dialog, then, the first text box will auto-populate with that directory. Next, we create the Initial File Name - don't forget to include the file extension (.asp or .aspx, with ASP.Net). It's also possible, here, to browse for, and assign an external stylesheet to the pages.

In the next dialog box, once we click the 'Apply' button, we come to the main DSG dialog box. Here's where we do the real work.

Here, at the top left, we will see the directory and initial filename assigned in in the first file dialog box. In the Action textbox, we assign the filename for the second page (used for ADD and EDIT/UPDATE).

In the next text box, below the ACTION textbox, assign a name to the form itself. The language/Platform is automatically detected by the file extension you provided in the first file dialog box

In the 'Generate' section, choose the parts of the solution you require. With this section, we start with a 'Listing Page', and then, by checking any of the next three boxes, you can add Add/Insert, an Edit/Update or Delete functionality to your solution.

Next, click the 'Select Datasource' button. Choose MS Access or OleDb (for SQL Server).
Note:Keep in mind, even if you are using ASP.Net, for the means of this program, you would select OleDB, because of the way ASP Express connects to SQL Server. The ASP.Net code generated will still use the SQL Client in ASP.Net

When choosing OleDb, for SQL Server, the next dialog box to appear will be the Windows Datalink dialog:
Here, in 'Step 1', you can either type in a URL for a SQL Server, or, if you have any SQL Servers attached to your computer's network, if they are 'broadcasting' their presence, they should appear in the dropdown list. Just choose from the list.

Then, in 'Step 2', choose whether or not you would like your pages to connect with Windows authentication, or a specific user name and password. If you wish to connect using a specific user name and password, then, just type in your user name and password. The checkboxes under this area are very important to ASP Express. In order for your password to get 'sent' to the generated code, you must click and select the 'Allow Saving Password' checkbox.

In 'Step 3', the dropdown list should, by then, have a list of available databases on your selected server. Here, you can either directly type in your database name, or select it from the list of available databases.

Once you click the 'OK' button, you're back to the main DSG dialog box. (MS Access, textboxes for User ID and Password will be visible.) Now, you can use the' Choose Table' pull down menu, to choose the Table for the main table listing. Once a table is chosen, the grid at the bottom will populate with the field names from that table. Then, if you wish the table to be ordered by any particular column, choose that column from the 'Sorting Column' pull down menu. Also, here, you can choose 'ASC' or 'DESC' for the actual order of the listing. Also - you can choose to only show a certain number of rows by clicking the 'Use Top 'x' Rows checkbox, and type in the number of rows desired, in the text box that will, at time of checking, will appear.

Grid Columns
The second grid column is for choosing the Primary Key/Unique field of the Table - you can only choose one, but one must be selected. In the Width column, you can actually change the width of the textboxes in the Add/Edit/Update page, for each individual field. In the Default column, you can type in a default for that field in the Add/Edit/Update page. In the Control column, choose which HTML form element type you wish (Textbox/TextArea/Radiobutton, etc). 'Lookup' is a Select List/DropdownList form element.

Now, we come to the 'Foreign Key' column. Here, if a 'selectable' form element is chosen (like Lookup/Radiobutton/checkbox, etc) in the 'Control' column, then by double-clicking on the row for an associated Table Field, you can choose the table reference for the Add/Edit/Update page. In that dialog box, you can either manually enter list items, or by choosing 'Dynamic' you can actually select the table, table PK and field name associated with that field in the Grid.

For instance, in the Northwind Database (the Products Table), the SupplierID field references the SupplierID field in the Suppliers table, so you can choose the Suppliers table, the PK of that table and the text representation you desire for that field (like the Company Name, in the Suppliers table). This information chosen will be the selectable item in the Add/Edit/Update page. .