[AX] Connect to Dynamics AX Data from PowerBuilder
This article demonstrates how to access Dynamics AX data from PowerBuilder using the CData ADO.NET Provider for Dynamics AX.
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 Dynamics AX in PowerBuilder.
This article shows how to create a basic PowerBuilder application that uses the CData ADO.NET Provider for Dynamics AX to perform reads and writes.
In a new WPF Window Application solution, add all the Visual Controls needed for the connection properties. Below is a typical connection string:User=MyUser;Domain=MyDomain;objectserver=MicrosoftDynamicsAX@WIN-1IP52JPQVJS:2712;
To connect to DynamicsAX, specify User, Domain, and ObjectServer. You can also surface tables for a specific Company; when this property is blank, the default company is used.
Alternatively, you can use the .NET Business Connector to connect on behalf of DynamicsAX users. You can obtain the ProxyUser and ProxyDomain properties on the System service accounts form: Click System Administration -> Setup -> System -> System Service Accounts. Additionally, set ProxyPassword.
By default, only transaction data and base information from the TRANSACTION and MAIN table groups is returned. You can specify which groups to return with TableGroups.
Set Language to use the same language you use in your DynamicsAX labels.
Add the DataGrid control from the .NET controls.
Configure the columns of the DataGrid control. Below are several columns from the Account table:view source
<DataGrid AutoGenerateColumns="False" Margin="13,249,12,14" Name="datagrid1" TabIndex="70" ItemsSource="{Binding}">
<DataGrid.Columns>
<DataGridTextColumn x:Name="idColumn" Binding="{Binding Path=TableId}" Header="TableId" Width="SizeToHeader" />
<DataGridTextColumn x:Name="nameColumn" Binding="{Binding Path=Name}" Header="Name" Width="SizeToHeader" />
...
</DataGrid.Columns>
</DataGrid>
Add a reference to the CData ADO.NET Provider for Dynamics AX assembly.
Connect the DataGridOnce 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:
view source
System.Data.CData.DynamicsAX.DynamicsAXConnection conn
conn = create System.Data.CData.DynamicsAX.DynamicsAXConnection(connectionString)
System.Data.CData.DynamicsAX.DynamicsAXCommand comm
comm = create System.Data.CData.DynamicsAX.DynamicsAXCommand(command, conn)
System.Data.DataTable table
table = create System.Data.DataTable
System.Data.CData.DynamicsAX.DynamicsAXDataAdapter dataAdapter
dataAdapter = create System.Data.CData.DynamicsAX.DynamicsAXDataAdapter(comm)
dataAdapter.Fill(table)
datagrid1.ItemsSource=table.DefaultView
The code above can be used to bind data from the specified query to the DataGrid.
//////////////////////////////////////////////////////////////////////////////////////////////////////////
이 문서에서는 Dynamics AX 용 CData ADO.NET 공급자를 사용하여 PowerBuilder에서 Dynamics AX 데이터에 액세스하는 방법을 보여줍니다.
CData ADO.NET 공급자는 PowerBuilder를 포함하여 Microsoft .NET을 지원하는 모든 플랫폼 또는 개발 기술에서 사용할 수있는 사용하기 쉬운 표준 기반 컨트롤입니다. 이 문서에서는 PowerBuilder에서 Dynamics AX에 CData ADO.NET 공급자를 사용하는 방법을 보여줍니다.
이 문서에서는 Dynamics AX 용 CData ADO.NET 공급자를 사용하여 읽기 및 쓰기를 수행하는 기본 PowerBuilder 응용 프로그램을 만드는 방법을 보여줍니다.
새로운 WPF Window Application 솔루션에서 연결 속성에 필요한 모든 Visual Control을 추가하십시오. 다음은 일반적인 연결 문자열입니다.User = MyUser; Domain = MyDomain; objectserver = MicrosoftDynamicsAX @ WIN-1IP52JPQVJS : 2712;
DynamicsAX에 연결하려면 사용자, 도메인 및 ObjectServer를 지정하십시오. 특정 회사에 대한 테이블을 표시 할 수도 있습니다. 이 속성이 비어 있으면 기본 회사가 사용됩니다.
또는 .NET Business Connector를 사용하여 DynamicsAX 사용자 대신 연결할 수 있습니다. 시스템 서비스 계정 양식에서 ProxyUser 및 ProxyDomain 특성을 얻을 수 있습니다. 시스템 관리-> 설정-> 시스템-> 시스템 서비스 계정을 누르십시오. 또한 ProxyPassword를 설정하십시오.
기본적으로 TRANSACTION 및 MAIN 테이블 그룹의 트랜잭션 데이터 및 기본 정보 만 리턴됩니다. TableGroups로 반환 할 그룹을 지정할 수 있습니다.
DynamicsAX 레이블에서 사용하는 것과 동일한 언어를 사용하도록 언어를 설정하십시오.
.NET 컨트롤에서 DataGrid 컨트롤을 추가하십시오.
DataGrid 컨트롤의 열을 구성하십시오. 아래는 계정 테이블의 몇 가지 열입니다.view source
<DataGrid AutoGenerateColumns="False" Margin="13,249,12,14" Name="datagrid1" TabIndex="70" ItemsSource="{Binding}">
<DataGrid.Columns>
<DataGridTextColumn x:Name="idColumn" Binding="{Binding Path=TableId}" Header="TableId" Width="SizeToHeader" />
<DataGridTextColumn x:Name="nameColumn" Binding="{Binding Path=Name}" Header="Name" Width="SizeToHeader" />
...
</DataGrid.Columns>
</DataGrid>
Dynamics AX 어셈블리 용 CData ADO.NET 공급자에 대한 참조를 추가하십시오.
DataGrid 연결시각적 요소가 구성되면 Connection, Command 및 DataAdapter와 같은 표준 ADO.NET 개체를 사용하여 SQL 쿼리 결과로 DataTable을 채울 수 있습니다.
view source
System.Data.CData.DynamicsAX.DynamicsAXConnection conn
conn = create System.Data.CData.DynamicsAX.DynamicsAXConnection(connectionString)
System.Data.CData.DynamicsAX.DynamicsAXCommand comm
comm = create System.Data.CData.DynamicsAX.DynamicsAXCommand(command, conn)
System.Data.DataTable table
table = create System.Data.DataTable
System.Data.CData.DynamicsAX.DynamicsAXDataAdapter dataAdapter
dataAdapter = create System.Data.CData.DynamicsAX.DynamicsAXDataAdapter(comm)
dataAdapter.Fill(table)
datagrid1.ItemsSource=table.DefaultView
위의 코드는 지정된 쿼리의 데이터를 DataGrid에 바인딩하는 데 사용할 수 있습니다.
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 Dynamics AX in PowerBuilder.
This article shows how to create a basic PowerBuilder application that uses the CData ADO.NET Provider for Dynamics AX to perform reads and writes.
In a new WPF Window Application solution, add all the Visual Controls needed for the connection properties. Below is a typical connection string:User=MyUser;Domain=MyDomain;objectserver=MicrosoftDynamicsAX@WIN-1IP52JPQVJS:2712;
To connect to DynamicsAX, specify User, Domain, and ObjectServer. You can also surface tables for a specific Company; when this property is blank, the default company is used.
Alternatively, you can use the .NET Business Connector to connect on behalf of DynamicsAX users. You can obtain the ProxyUser and ProxyDomain properties on the System service accounts form: Click System Administration -> Setup -> System -> System Service Accounts. Additionally, set ProxyPassword.
By default, only transaction data and base information from the TRANSACTION and MAIN table groups is returned. You can specify which groups to return with TableGroups.
Set Language to use the same language you use in your DynamicsAX labels.
Add the DataGrid control from the .NET controls.
Configure the columns of the DataGrid control. Below are several columns from the Account table:view source
<DataGrid AutoGenerateColumns="False" Margin="13,249,12,14" Name="datagrid1" TabIndex="70" ItemsSource="{Binding}">
<DataGrid.Columns>
<DataGridTextColumn x:Name="idColumn" Binding="{Binding Path=TableId}" Header="TableId" Width="SizeToHeader" />
<DataGridTextColumn x:Name="nameColumn" Binding="{Binding Path=Name}" Header="Name" Width="SizeToHeader" />
...
</DataGrid.Columns>
</DataGrid>
Add a reference to the CData ADO.NET Provider for Dynamics AX assembly.
Connect the DataGridOnce 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:
view source
System.Data.CData.DynamicsAX.DynamicsAXConnection conn
conn = create System.Data.CData.DynamicsAX.DynamicsAXConnection(connectionString)
System.Data.CData.DynamicsAX.DynamicsAXCommand comm
comm = create System.Data.CData.DynamicsAX.DynamicsAXCommand(command, conn)
System.Data.DataTable table
table = create System.Data.DataTable
System.Data.CData.DynamicsAX.DynamicsAXDataAdapter dataAdapter
dataAdapter = create System.Data.CData.DynamicsAX.DynamicsAXDataAdapter(comm)
dataAdapter.Fill(table)
datagrid1.ItemsSource=table.DefaultView
The code above can be used to bind data from the specified query to the DataGrid.
//////////////////////////////////////////////////////////////////////////////////////////////////////////
이 문서에서는 Dynamics AX 용 CData ADO.NET 공급자를 사용하여 PowerBuilder에서 Dynamics AX 데이터에 액세스하는 방법을 보여줍니다.
CData ADO.NET 공급자는 PowerBuilder를 포함하여 Microsoft .NET을 지원하는 모든 플랫폼 또는 개발 기술에서 사용할 수있는 사용하기 쉬운 표준 기반 컨트롤입니다. 이 문서에서는 PowerBuilder에서 Dynamics AX에 CData ADO.NET 공급자를 사용하는 방법을 보여줍니다.
이 문서에서는 Dynamics AX 용 CData ADO.NET 공급자를 사용하여 읽기 및 쓰기를 수행하는 기본 PowerBuilder 응용 프로그램을 만드는 방법을 보여줍니다.
새로운 WPF Window Application 솔루션에서 연결 속성에 필요한 모든 Visual Control을 추가하십시오. 다음은 일반적인 연결 문자열입니다.User = MyUser; Domain = MyDomain; objectserver = MicrosoftDynamicsAX @ WIN-1IP52JPQVJS : 2712;
DynamicsAX에 연결하려면 사용자, 도메인 및 ObjectServer를 지정하십시오. 특정 회사에 대한 테이블을 표시 할 수도 있습니다. 이 속성이 비어 있으면 기본 회사가 사용됩니다.
또는 .NET Business Connector를 사용하여 DynamicsAX 사용자 대신 연결할 수 있습니다. 시스템 서비스 계정 양식에서 ProxyUser 및 ProxyDomain 특성을 얻을 수 있습니다. 시스템 관리-> 설정-> 시스템-> 시스템 서비스 계정을 누르십시오. 또한 ProxyPassword를 설정하십시오.
기본적으로 TRANSACTION 및 MAIN 테이블 그룹의 트랜잭션 데이터 및 기본 정보 만 리턴됩니다. TableGroups로 반환 할 그룹을 지정할 수 있습니다.
DynamicsAX 레이블에서 사용하는 것과 동일한 언어를 사용하도록 언어를 설정하십시오.
.NET 컨트롤에서 DataGrid 컨트롤을 추가하십시오.
DataGrid 컨트롤의 열을 구성하십시오. 아래는 계정 테이블의 몇 가지 열입니다.view source
<DataGrid AutoGenerateColumns="False" Margin="13,249,12,14" Name="datagrid1" TabIndex="70" ItemsSource="{Binding}">
<DataGrid.Columns>
<DataGridTextColumn x:Name="idColumn" Binding="{Binding Path=TableId}" Header="TableId" Width="SizeToHeader" />
<DataGridTextColumn x:Name="nameColumn" Binding="{Binding Path=Name}" Header="Name" Width="SizeToHeader" />
...
</DataGrid.Columns>
</DataGrid>
Dynamics AX 어셈블리 용 CData ADO.NET 공급자에 대한 참조를 추가하십시오.
DataGrid 연결시각적 요소가 구성되면 Connection, Command 및 DataAdapter와 같은 표준 ADO.NET 개체를 사용하여 SQL 쿼리 결과로 DataTable을 채울 수 있습니다.
view source
System.Data.CData.DynamicsAX.DynamicsAXConnection conn
conn = create System.Data.CData.DynamicsAX.DynamicsAXConnection(connectionString)
System.Data.CData.DynamicsAX.DynamicsAXCommand comm
comm = create System.Data.CData.DynamicsAX.DynamicsAXCommand(command, conn)
System.Data.DataTable table
table = create System.Data.DataTable
System.Data.CData.DynamicsAX.DynamicsAXDataAdapter dataAdapter
dataAdapter = create System.Data.CData.DynamicsAX.DynamicsAXDataAdapter(comm)
dataAdapter.Fill(table)
datagrid1.ItemsSource=table.DefaultView
위의 코드는 지정된 쿼리의 데이터를 DataGrid에 바인딩하는 데 사용할 수 있습니다.