FireDAC.MongoDB Explore Sample

From RAD Studio Code Examples
Jump to: navigation, search

This is a sample that connects to a MongoDB server and lets you explore its content.

Location

You can find the ToggleSwitch sample project at:

  • Start | Programs | Embarcadero RAD Studio Athens | Samples and then navigate to:
    • Object Pascal\Database\FireDAC\Samples\DBMS Specific\MongoDB\Explore
  • Subversion Repository:
    • You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.

Description

This sample application shows how to connect to a MongoDB server and access databases, collection and collection data. You can use this application to browse the data of any existing MongoDB server.

MongoDBExplore.png

How to Use the Sample

  1. Navigate to the location given above and open Mongo_Explore.dproj.
  2. If your MongoDB server is not running on the machine where you want to run the sample application, or requires non-default connection parameter such as a port other than 27017, configure the FDConnection1 component accordingly. For details, see Connect to MongoDB Database.
  3. Press F9 or choose Run > Run.
  4. Select databases or collections on the grids to browse your MongoDB server data.

Uses

See Also