Ready to get started?

Learn more about the CData ADO.NET Provider for EDGAR Online or download a free trial:

Download Now

Connect to EDGAR Online Data from PowerBuilder

This article demonstrates how to access EDGAR Online data from PowerBuilder using the CData ADO.NET Provider for EDGAR Online.

The CData ADO.NET providers are easy-to-use, standards-based controls that can be used from any platform or development technology that supports Microsoft .NET, including PowerBuilder. This article shows how to use the CData ADO.NET Provider for EDGAR Online in PowerBuilder.

This article shows how to create a basic PowerBuilder application that uses the CData ADO.NET Provider for EDGAR Online to perform reads and writes.

  1. In a new WPF Window Application solution, add all the Visual Controls needed for the connection properties. Below is a typical connection string:

    AppKey=20dd8ce9904d422ed89ebde1ad40d

    1. Navigate to https://developer.edgar-online.com/ and create an account.
    2. Register a new application and retrieve the AppKey. You should select one of the available Web APIs this application will use like HackPack, Insider Trades or Institutional Ownership.
      Note: HackPack is the most important Web API that an application can use since it supports a large number of endpoints. If you are getting the "Access Denied" error you must create a new app and select the correct Web API which supports the resource you are querying.
    3. After successfully creating a new app, you can access your keys through your "my account" area. Set the AppKey connection property value equal to the Key of your application.

  2. Add the DataGrid control from the .NET controls.
  3. Configure the columns of the DataGrid control. Below are several columns from the Account table: <DataGrid AutoGenerateColumns="False" Margin="13,249,12,14" Name="datagrid1" TabIndex="70" ItemsSource="{Binding}"> <DataGrid.Columns> <DataGridTextColumn x:Name="idColumn" Binding="{Binding Path=Id}" Header="Id" Width="SizeToHeader" /> <DataGridTextColumn x:Name="nameColumn" Binding="{Binding Path=Id}" Header="Id" Width="SizeToHeader" /> ... </DataGrid.Columns> </DataGrid>
  4. Add a reference to the CData ADO.NET Provider for EDGAR Online assembly.

Connect the DataGrid

Once the visual elements have been configured, you can use standard ADO.NET objects like Connection, Command, and DataAdapter to populate a DataTable with the results of an SQL query:

System.Data.CData.EdgarOnline.EdgarOnlineConnection conn conn = create System.Data.CData.EdgarOnline.EdgarOnlineConnection(connectionString) System.Data.CData.EdgarOnline.EdgarOnlineCommand comm comm = create System.Data.CData.EdgarOnline.EdgarOnlineCommand(command, conn) System.Data.DataTable table table = create System.Data.DataTable System.Data.CData.EdgarOnline.EdgarOnlineDataAdapter dataAdapter dataAdapter = create System.Data.CData.EdgarOnline.EdgarOnlineDataAdapter(comm) dataAdapter.Fill(table) datagrid1.ItemsSource=table.DefaultView

The code above can be used to bind data from the specified query to the DataGrid.