各製品の資料を入手。
詳細はこちら →Viewing MYOB AccountRight データ in RAD Studio Data Explorer
How to view MYOB AccountRight データ in RAD Studio Data Explorer using the CData ODBC Driver for MYOB AccountRight.
最終更新日:2023-06-12Embarcadero RAD Studio provides a development environment for Delphi and C++Builder applications. With the CData ODBC Driver for MYOB AccountRight, you gain access to live MYOB AccountRight データ within RAD Studio, abstracting the data into tables, views, and stored procedures that can be used to both retrieve and update MYOB AccountRight データ. This article will walk through connecting to MYOB AccountRight using the Data Explorer.
Configure a Connection to MYOB AccountRight
If you have not already, first specify connection properties in an ODBC DSN (data source name). This is the last step of the driver installation. You can use the Microsoft ODBC Data Source Administrator to create and configure ODBC DSNs.
MYOB への接続
MYOB 会社ファイルに接続するには、CompanyFileId をデータを取得したい会社ファイルのID に設定します。指定しない場合は、最初に返された会社ファイルのID(アルファベット順にソート)が使用されます。
この接続プロパティは、CompanyFiles ビューを除くすべてのテーブルおよびビューにアクセスするために必要です。CompanyFiles ビューは、アカウントに紐づく会社ファイル(およびその関連ID)を表示するために使用できます。会社ファイルのID がわからない場合は、このビューを使用してください。
次のプロパティを追加設定します。
オンプレミスインスタンス | Instance:OnPremise に設定。 |
AuthScheme:Basic に設定。 | |
User:会社のファイルに紐づいているユーザー名。会社ファイルを作成すると、Administrator というユーザーアカウントが自動的に作成されます。デフォルトでは、Administrator ユーザーアカウントにはパスワードが割り当てられません。 | |
InitiateOAuth:OFF。 | |
Url:MYOB インスタンスのURL。 | |
クラウドインスタンス | Instance:Cloud に設定。 |
AuthScheme:OAuth に設定。 | |
InitiateOAuth:GETANDREFRESH。 | |
User:会社のファイルに紐づいているユーザー名。 | |
Password:(パスワードが設定されている場合)会社ファイルの認可されたユーザーのパスワードに設定。 |
OAuth で認証する場合は、さらにヘルプドキュメントを参照してください。
Connecting to MYOB AccountRight データ Using Data Explorer
You can create a simple application for displaying MYOB AccountRight データ by utilizing the CData FireDAC Components for MYOB AccountRight and a new VCL Forms Application:
- Open the Data Explorer in RAD Studio and expand FireDAC.
- Right-click the ODBC Data Source node in the Data Explorer.
- Click Add New Connection.
- Enter a name for the connection.
- In the FireDAC Connection Editor that appears, set the DataSource property to the name of the ODBC DSN for MYOB AccountRight.
- Back in the Data Explorer, expand the tables for the connection.
Create a new VCL Forms application and drag a table (for example: Accounts) onto the form.
- Select the AccountsTable object on the form and set the Active property to true.
Right-click on the object, bind visually, and link everything (*) to a new control (TStringGrid).
Arrange the TStringGrid on the form and run the application to see the Accounts data.
Related Articles
Below you can find other articles for using the CData ODBC Driver with RAD Studio, Delphi, and C++ Builder.