{"id":2186,"date":"2010-05-19T09:46:24","date_gmt":"2010-05-19T17:46:24","guid":{"rendered":"http:\/\/www.sapien.com\/blog\/?p=2186"},"modified":"2010-09-25T11:47:32","modified_gmt":"2010-09-25T19:47:32","slug":"feature-peek-2011-queries-and-grids-in-1-2-3","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2010\/05\/19\/feature-peek-2011-queries-and-grids-in-1-2-3\/","title":{"rendered":"Feature Peek 2011: Queries and Grids in 1, 2, 3"},"content":{"rendered":"<p>A new feature in PrimalForms 2011 is the Database Browser which makes creating queries in PowerShell GUIs as easy as 1, 2, 3:<\/p>\n<p><a href=\"http:\/\/www.primaltools.com\/screenshots\/FeaturePeekDatabaseBrowser.mp4\">Click here to view a video of the Database Browser!<\/a>\u00a0<\/p>\n<p>1. Create a Database Connection or open an existing connection<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/05\/CreateDatabaseConnection.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"CreateDatabaseConnection\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/05\/CreateDatabaseConnection_thumb.png\" border=\"0\" alt=\"CreateDatabaseConnection\" width=\"236\" height=\"151\" \/><\/a><\/p>\n<p><span style=\"font-size: xx-small;\">Fig 1: Create New Database Connection button<\/span><\/p>\n<p>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.<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/05\/DragTable1.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"DragTable\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/05\/DragTable_thumb1.png\" border=\"0\" alt=\"DragTable\" width=\"244\" height=\"196\" \/><\/a><\/p>\n<p><span style=\"font-size: xx-small;\">Fig 2: Drag the Table or View in the Designer to create the grid with query script.<\/span><\/p>\n<p>3. Call the generated function to run the query and load the DataGrid with the results.<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/05\/CallFunction.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"CallFunction\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/05\/CallFunction_thumb.png\" border=\"0\" alt=\"CallFunction\" width=\"244\" height=\"75\" \/><\/a><\/p>\n<p><span style=\"font-size: xx-small;\">Fig 3: Call the function to load the DataGrid with the query results<\/span><\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/05\/FormWithQueryGrid.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"FormWithQueryGrid\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2010\/05\/FormWithQueryGrid_thumb.png\" border=\"0\" alt=\"FormWithQueryGrid\" width=\"244\" height=\"161\" \/><\/a><\/p>\n<p><span style=\"font-size: xx-small;\">Fig 4: DataGrid with query results<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A new feature in PrimalForms 2011 is the Database Browser which makes creating queries in PowerShell GUIs as easy as 1, 2, 3: Click here to view a video of the Database Browser!\u00a0 1. Create a Database Connection or open an existing connection Fig 1: Create New Database Connection button 2. Use the Database Browser [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[582,21,25],"tags":[564,163,178,314,312],"class_list":["post-2186","post","type-post","status-publish","format-standard","hentry","category-feature-peek","category-software-news","category-windows-powershell","tag-564","tag-database","tag-features","tag-primalforms","tag-winforms"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/2186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=2186"}],"version-history":[{"count":9,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/2186\/revisions"}],"predecessor-version":[{"id":2405,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/2186\/revisions\/2405"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=2186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=2186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=2186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}