JDBC Driver for Microsoft Bing

Build 24.0.9175

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for Microsoft Bing consists of three basic steps:

  • Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
  • Provide the driver class. For example:
    cdata.jdbc.bing.BingDriver
  • Provide the JDBC URL. For example:
    jdbc:bing:APIKey=abc123;
    
    or
    
    jdbc:cdata:bing:APIKey=abc123;

    The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:bing:" or "jdbc:cdata:bing:" and can include any of the connection properties in name-value pairs separated with semicolons.

Connecting to Microsoft Bing

To connect to Microsoft Bing, set the APIKey. To obtain the API key, create a Bing Search resource through the Azure Marketplace, as the Bing Web Search API has moved from Azure Cognitive Services to Bing Search Services. Once your resource is created, you are provied with a subscription key (API key). Use this for the APIKey property in your connection setup.

Note: You can use the APIVersion property to specify the API version you are connecting to. The possible values are 'V5' and 'V7'. However, the Microsoft Bing Web Search API v5, previously available through Azure Cognitive Services has been deprecated. The default value is 'V7'. Ensure your application is using API version 'V7' and the updated endpoint to avoid service disruptions.

Creating a Bing Search Resource through Azure Marketplace

  1. Sign in to the Azure Portal with your Microsoft account. If you don’t have an account, click Create one!
  2. In the search bar, type Bing and select the appropriate Bing service from the Marketplace.
  3. Select your subscription details, or click Start free to sign up for a trial or purchase a subscription if you don't have one.
  4. Choose an existing Resource group or create a new one to organize your resources.
  5. Enter the instance details for a Name, Region, and select the Free F1 pricing tier or another package, if applicable.
  6. Accept the terms, and click Review + Create. Once deployment is complete, click Go to resource.
  7. To obtain your API key, click Keys and Endpoint from the left-pane menu. Use this key for the APIKey property.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 24.0.9175