Connect to JD Edwards Data from PowerBuilder via ADO.NET

Jerod Johnson
Jerod Johnson
Director, Technology Evangelism
This article demonstrates how to access JD Edwards data from Appeon PowerBuilder using the CData ADO.NET Provider for JD Edwards.

This article demonstrates using the CData ADO.NET Provider for JD Edwards in PowerBuilder, showcasing the ease of use and compatibility of these standards-based controls across various platforms and development technologies that support Microsoft .NET, including Appeon PowerBuilder.

This article shows how to create a basic PowerBuilder application that uses the CData ADO.NET Provider for JD Edwards to retrieve data.

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

    URL=https://your-jde-environment-app.example.com;User=admin;Password=myPassword;

    The driver connects to JD Edwards through your Application Interface Services (AIS) Server. Set the following connection properties:

    • URL: The base HTTPS URL of your AIS Server (e.g., https://jde-ais.example.com:8300).
    • User: Your JD Edwards username.
    • Password: Your JD Edwards password.
    • Environment (optional): The JD Edwards environment to use (e.g., PD920 for production or DV920 for development). If not specified, the AIS Server's default environment is used.
    • Role (optional): The JD Edwards role for the session. If not specified, the AIS Server's default role is used.
    • DeviceName (optional): An identifier for the connecting device or application, used for auditing and logging on the AIS Server.
    • Jasserver (optional): The specific Java Application Server (JAS) instance to route requests through, useful in clustered environments.

    Choosing Which Data Is Exposed

    JD Edwards organizes tables and business views by System Code, and the driver exposes each System Code as its own schema. Use these properties to control which schemas are available:

    • DataModel: One or more ERP modules (comma-separated) whose System Codes are exposed as schemas, or All to expose every System Code in the connected instance. Defaults to FinancialManagement.
    • SystemCodes: A comma-separated list of additional System Codes to expose alongside those from DataModel (e.g., 42,43).

    When you connect, the driver sends your credentials to the AIS Server to obtain a session token and caches it. The driver requests a new token automatically before the session expires.

  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=DocumentNumber}" Header="DocumentNumber" Width="SizeToHeader" />
    		...
    	</DataGrid.Columns>
    </DataGrid>
    
  4. Add a reference to the CData ADO.NET Provider for JD Edwards 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.JDEdwards.JDEdwardsConnection conn 
conn = create System.Data.CData.JDEdwards.JDEdwardsConnection(connectionString)

System.Data.CData.JDEdwards.JDEdwardsCommand comm 
comm = create System.Data.CData.JDEdwards.JDEdwardsCommand(command, conn)

System.Data.DataTable table
table = create System.Data.DataTable

System.Data.CData.JDEdwards.JDEdwardsDataAdapter dataAdapter
dataAdapter = create System.Data.CData.JDEdwards.JDEdwardsDataAdapter(comm)
dataAdapter.Fill(table)	
datagrid1.ItemsSource=table.DefaultView

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

Ready to get started?

Download a free trial of the JD Edwards Data Provider to get started:

 Download Now

Learn more:

JD Edwards Icon JD Edwards ADO.NET Provider

Rapidly create and deploy powerful .NET applications that integrate with JD Edwards data including AccountLedger, ProposalofPayment, ContractRevenueSummary, EmployeeEnrollment, RentIncreaseAmounts, and more!