Viewing Sage 300 データ in RAD Studio Data Explorer

How to view Sage 300 データ in RAD Studio Data Explorer using the CData ODBC Driver for Sage 300.

最終更新日:2023-06-12

Embarcadero RAD Studio provides a development environment for Delphi and C++Builder applications. With the CData ODBC Driver for Sage 300, you gain access to live Sage 300 データ within RAD Studio, abstracting the data into tables, views, and stored procedures that can be used to both retrieve Sage 300 データ. This article will walk through connecting to Sage 300 using the Data Explorer.

Configure a Connection to Sage 300

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.

Sage 300 には、Sage 300 Web API で通信するための初期設定が必要となるます。

  • Sage 300 のユーザー向けのセキュリティグループを設定します。Sage 300 のユーザーに、Security Groups の下にあるbSage 300 Web API オプションへのアクセスを付与します(各モジュール毎に必要です)。
  • /Online/Web/Online/WebApi フォルダ内のweb.config ファイルを両方編集して、AllowWebApiAccessForAdmin のキーを true 設定します。webAPI アプリプールを再起動すると設定が反映されます。
  • ユーザーアクセスを設定したら、https://server/Sage300WebApi/ をクリックして、web API へのアクセスを確認してください。

Basic 認証を使用してSage 300 へ認証します。

Basic 認証を使用して接続する

Sage 300 に認証するには、次のプロパティを入力してください。プロバイダーは、クッキーを使用してSage 300 が開いたセッションを再利用することに注意してください。 そのため、資格情報はセッションを開く最初のリクエストでのみ使用されます。その後は、Sage 300 が返すクッキーを認証に使用します。

  • Url:Sage 300 をホストするサーバーのURL に設定します。Sage 300 Web API 用のURL を次のように作成してください。 {protocol}://{host-application-path}/v{version}/{tenant}/ 例えば、 http://localhost/Sage300WebApi/v1.0/-/ です。
  • User:アカウントのユーザー名に設定します。
  • Password:アカウントのパスワードに設定します。

Connecting to Sage 300 データ Using Data Explorer

You can create a simple application for displaying Sage 300 データ by utilizing the CData FireDAC Components for Sage 300 and a new VCL Forms Application:

  1. Open the Data Explorer in RAD Studio and expand FireDAC.
  2. Right-click the ODBC Data Source node in the Data Explorer.
  3. Click Add New Connection.
  4. Enter a name for the connection.
  5. In the FireDAC Connection Editor that appears, set the DataSource property to the name of the ODBC DSN for Sage 300.
  6. Back in the Data Explorer, expand the views for the connection.
  7. Create a new VCL Forms application and drag a view (for example: OEInvoices) onto the form.

  8. Select the OEInvoicesView object on the form and set the Active property to true.
  9. Right-click on the object, bind visually, and link everything (*) to a new control (TStringGrid).

  10. Arrange the TStringGrid on the form and run the application to see the OEInvoices data.

Related Articles

Below you can find other articles for using the CData ODBC Driver with RAD Studio, Delphi, and C++ Builder.

関連コンテンツ

トライアル・お問い合わせ

30日間無償トライアルで、CData のリアルタイムデータ連携をフルにお試しいただけます。記事や製品についてのご質問があればお気軽にお問い合わせください。