Support Forums

Data Sources

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
User avatar
nhsaait
Posts: 4
Joined: Sun Mar 03, 2013 12:44 pm

Data Sources

Postby nhsaait » Tue Mar 26, 2013 4:26 am

When will the Data Sources functionality be available within Primal Forms.
User avatar
davidc
Posts: 4354
Joined: Thu Aug 18, 2011 4:56 am

Re: Data Sources

Postby davidc » Tue Mar 26, 2013 8:54 am

Can you elaberate? You can bind data to controls using the DataSource property in the editor.

For example:

PowerShell Code
Double-click the code block to select all.
$results = Get-WmiObject Win32_Process
#Convert to ArrayList so we can Data Bind the results
$array = New-Object System.Collections.ArrayList
$array.AddRange($results)
$datagridviewResults.DataSource = $array


David
David
SAPIEN Technologies, Inc.
User avatar
nhsaait
Posts: 4
Joined: Sun Mar 03, 2013 12:44 pm

Re: Data Sources

Postby nhsaait » Tue Mar 26, 2013 4:28 pm

Sorry i should have been more specific...

I want to bind Data to a datagridview direct from a MSSQL database. I can do it by inserting code like...

Code: Select all

   
#Database Query
$QueryString = "select LastUpdateDetect, LastUpdateDownload, LastUpdateInstall, TimeLastChecked from dbo.Pending_Updates_Counts where ClientName = " + "'" + $Hostname + "'"

#Database Connection String
$ConnectionString = 'Data Source=$SQLSERVER;Initial Catalog=Client_Info;Integrated Security=True;User ID=;Password='
   
$command = New-Object System.Data.SqlClient.SqlCommand ($QueryString,$ConnectionString)
$adapter = New-Object System.Data.SqlClient.SqlDataAdapter ($command)


I would rather just be able to drag the Table from the database browser and then add the Data Source info from the DataGridView Tasks menu... The Choose Data Source option says "none" and there is no where to add a source.
User avatar
davidc
Posts: 4354
Joined: Thu Aug 18, 2011 4:56 am

Re: Data Sources

Postby davidc » Wed Mar 27, 2013 11:50 am

When you drag and drop a database connection or table it will insert a grid and it will insert a query function.

David
David
SAPIEN Technologies, Inc.
User avatar
nhsaait
Posts: 4
Joined: Sun Mar 03, 2013 12:44 pm

Re: Data Sources

Postby nhsaait » Thu Mar 28, 2013 4:25 am

Hi David... Thanks for the replies...

I see that it does create the function for me when dragging a table over however there still seems to be some functionality missing. See below...
Attachments
form.jpg
form.jpg (43.02 KiB) Viewed 8504 times
User avatar
davidc
Posts: 4354
Joined: Thu Aug 18, 2011 4:56 am

Re: Data Sources

Postby davidc » Thu Mar 28, 2013 8:57 am

Note: The source does not appear in the designer. You need only call the function it will handle the binding when the script is ran.

I will add the request to the wish list.

David
David
SAPIEN Technologies, Inc.
User avatar
nhsaait
Posts: 4
Joined: Sun Mar 03, 2013 12:44 pm

Re: Data Sources

Postby nhsaait » Tue Apr 02, 2013 2:05 am

Thanks David...

Return to “PrimalForms”

Who is online

Users browsing this forum: No registered users and 2 guests