Generated SQL Scripts

SQL Code


Listed below are quick descriptions of the SQL Stored Procedure or Ad Hoc/Dynamic SQL WinFormsGen generates. When you choose to generate stored procedures, these scripts are directly generated in the database. Otherwise, when you choose ad-hoc/dynamic SQL, SQL scripts are generated in class files added to the web application.

One of each of the following objects listed below may be generated per table in your database.

Generated Script Quick Description
1. Select All Retrieves all records from a table.
2. Select All By a Foreign Key Retrieves all records from a table filtered by a foreign key. Generated for each foreign key in the table.
3. Select All Dynamic Where Retrieves all records from a table filtered by one or more fields. Used for search.
4. Select a Record by Primary Key Retrieves a record from a table filtered by the primary key.
5. Select Drop Down List Data Retrieves the primary key and another field. Used for DropDownList web controls.
6. Select, Skip, and Take Retrieves a specified amount of records. Fetches records from a specific pointer, while skipping some records.
7. Select, Skip, and Take By a Foreign Key Retrieves a specified amount of records from a table filtered by a foreign key. Fetches records from a specific pointer, while skipping some records. Generated for each foreign key in the table.
8. Select, Skip, and Take Dynamic Where Retrieves a specified amount of records from a table filtered by one or more fields. Fetches records from a specific pointer, while skipping some records. Used for search.
9. Select Totals Retrieves aggregate sum of fields with money data type. Only generated for tables with money data type field.
10. Insert Inserts one new record in table.
11. Update Updates an existing record by primary key.
12. Delete Deletes an existing record by primary key.
13. Get Record Count Gets the number of records from a table.
14. Get Record Count by Foreign Key Gets the number of records from a table filtered by a foreign key. Generated for each foreign key in the table.
15. Get Record Count Dynamic Where Gets the number of records from a table filtered by one or more fields. Used for search.
* Please see notes.