Connecting to an ODBC Database

To connect using the ODBC provider, you either make a direct connection to a database or upload a file for the resource. The resource created from an ODBC database is always a feature source.

To connect to an ODBC database

  1. Click FileNewData Connection.
  2. In the Connect To Data dialog box, select OSGeo FDO Provider for ODBC and click OK.

    The Connection Editor is displayed to the right of the Site Explorer.

  3. For Type Of Connection, select one of the following:
    • Connect To A File And Upload To The Infrastructure Studio Library: Click New and select the file to access (Microsoft Access or Excel). When you save the connection, the file is loaded into the resource repository, where it is stored as resource data.
    • Connect To An External File: Click File and enter a pathname or select an alias set up in Infrastructure Map Server - Site Administrator. A connection string is automatically generated after you select the file.
    • Connect To A Database: Make a selection from the Type Of Database list. A connection string template is automatically generated. You must replace the square brackets with the required parameters to make the connecion. The connection string uses the following syntax:
      Driver={Oracle ODBC Driver};Dbq=[Insert database name];Xsm=[Insert schema name (optional)];Uid=;Pwd=;]

      Using the optional XSM (schema name) parameter will improve performance.

    • Connect Via A Data Source Name (DSN) Set Up On This Server: The Map Server administrator must set up the DSN. The system DSN must be on all of the servers (if the site has multiple servers). Files are not loaded into the resource repository; they are left where they were originally set up.
  4. Optionally, select Specify User Credentials. Then do one of the following:
    • If the database does not require a user ID and password, select Use Map Server Credentials.
    • If the database requires them, select Use The Following Credentials and enter the user ID and password.
  5. Click Test Connection.
    • You should see a Successful Connection message. If you receive an error, check the connection string carefully or verify that the DSN is set up correctly.
    • If necessary, modify the string in the Connection String field or enter your own.
      Note:

      For Microsoft SQL Server, when entering the server name in the appropriate place in the Connection String window, you must enter the fully qualified Microsoft SQL Server 2008 server name. In many cases, this is the server name followed by the Microsoft SQL Server instance name.

    • Click Reset to restore the automatically generated connection string.
  6. Optionally, under Define Geometry Properties To Create Spatial Feature Classes, select the tables and coordinate system to use to create geometry.
  7. Optionally, under Joins With Other Feature Sources, you can set up feature joins after you have saved the connection. For more information, see Using Feature Joins.
  8. On the Autodesk Infrastructure Studio toolbar, click Save to store this connection resource in the repository.