製品をチェック

無償トライアル:

無償トライアルへ

製品の情報と無償トライアルへ:

ShipStation JDBC Driver

ShipStation データに連携するJava アプリケーションを素早く、簡単に開発できる便利なドライバー。

データ連携でお困りですか?

お問い合わせ

PowerBuilder からShipStation データに連携


この記事では、ShipStation JDBC ドライバーを使用してPowerBuilder からShipStation にアクセスする方法を説明します。


加藤龍彦
ウェブデベロッパー

CData JDBC Driver for ShipStation は、標準ベースのコントロールであり、PowerBuilder を含むJDBC をサポートするプラットフォームまたは開発テクノロジーから使用できます。 また、PowerBuilder でCData JDBC Driver for ShipStation を使用する方法についても詳しく説明します。

この記事では、CData JDBC Driver for ShipStation を使用してデータを取得し、基本的なPowerBuilder アプリケーションを作成する方法を説明します。

PowerBuilder からShipStation データに接続

以下のステップに従ってDatabase Painter ツールを使用し、JDBC URL for ShipStation に基づいてデータベースプロファイルを作成します。データベースプロファイルを使用して、接続プロパティを保存できます。Ⅾatabase Painter では、データをグラフィカルに操作したり、SQL クエリを実行したりできます。

  1. ドライバーJAR をPowerBuilder クラスパスに追加します。CLASSPATH システム環境変数を、インストールディレクトリのlib サブフォルダにあるドライバーJAR へのパスに設定します。

    NotePowerBuilder Classic を使用している場合は、[Tools]->[System Options]->[Java]をクリックし、ドライバーJAR へのパスを追加することもできます。

  2. [Tools]->[Database Painter]と進みます。
  3. JDBC のノードを右クリックし、[New Profile]をクリックします。
  4. [Database Profile Setup]ダイアログで、以下を入力します。
    • Profile Name:プロファイルのわかりやすい名前を入力します。
    • Driver Name:ドライバーのクラス名にcdata.jdbc.shipstation.ShipStationDriver を入力します。
    • URL:JDBC URL を入力します。

      Use the BASIC Authentication standard to connect.

      1. Login to your ShipStation account
      2. Click on the settings icon in the upper right corner. A column menu will show up on the left
      3. Click Account -> API Settings
      4. On the API Settings page, note the API Key and API Secret.

      Authenticating to ShipStation

      • APIKey: Set this to the API key from the API settings page.
      • APISecret: Set this to the Secret key from the API settings page.

      ビルトイン接続文字列デザイナ

      JDBC URL の構成については、ShipStation JDBC Driver に組み込まれている接続文字列デザイナを使用してください。JAR ファイルのダブルクリック、またはコマンドラインからJAR ファイルを実行します。

      java -jar cdata.jdbc.shipstation.jar

      接続プロパティを入力し、接続文字列をクリップボードにコピーします。以下は一般的なJDBC URL です。

      jdbc:shipstation:APIKey='YourAPIKey';APISecret='YourAPISecret'
    The JDBC data source defined in the Database Profile Setup dialog.(Salesforce is shown.)
  5. テーブルを表示および編集するには、テーブルを右クリックして[Edit Data]->[Grid]をクリックします。
Modify database objects in the Database Painter.(Salesforce is shown.)

ShipStation をPowerBuilder Controls と共に使用する

標準のPowerBuilder オブジェクトを使用してJDBC データソースに接続し、クエリを実行できます。以下の例は、ShipStation をDataWindowに取得する方法を示しています。次のコードをopen メソッドに追加できます。

SQLCA.DBMS = "JDBC" SQLCA.AutoCommit = False SQLCA.DBParm = "Driver='cdata.jdbc.shipstation.ShipStationDriver',URL='jdbc:shipstation:APIKey='YourAPIKey';APISecret='YourAPISecret'"; CONNECT USING SQLCA; dw_tags.SetTransObject(SQLCA); dw_tags.Retrieve();