A new feature in PrimalForms 2011 is the Database Browser which makes creating queries in PowerShell GUIs as easy as 1, 2, 3:
1. Create a Database Connection or open an existing connection
Fig 1: Create New Database Connection button
2. Use the Database Browser to drag a table you wish to query onto the Form Designer. It will automatically create a grid and the necessary code to fill the grid.
Fig 2: Drag the Table or View in the Designer to create the grid with query script.
3. Call the generated function to run the query and load the DataGrid with the results.
Fig 3: Call the function to load the DataGrid with the query results
Fig 4: DataGrid with query results