Jump to content
hsauro

Access MongoDB Atlas

Recommended Posts

Has anyone had any experience in connecting FireDAC to MongoDB Atlas? I can connect to the database easily using the MongoDB atlas compass application and I can also easily connect to it from python using pymongo, but I can't fathom how to connect to it via Delphi. I am using Delphi Pro 11.1, so I assume it has the capabilities to connect.  I noticed someone asked a similar question last year on StackOverflow, but there was no response. If I have to I can call python from Delphi. 

 

https://stackoverflow.com/questions/68401095/connection-to-mongodb-atlas-with-delphi

 

What I have done is copied over the two monogo specific DLLs I need, added a FDConnection to a VCl windows and double click that to bring up a dialog box and enter the details but I can't seem to get it to work. The main error is failing to resolve mongodb+srv which I believe is the server name 

Edited by hsauro

Share this post


Link to post

As an experiment I set up my own mongodb on a spare linux machine. I can connect from other clients except Delphi. My conclusion is that mongo support for Delphi is probably broken.

Share this post


Link to post

Do you know whether this will work on the Mac? I noticed it needs a couple of DLLs. I wonder if there are equivalent dylibs?

Share this post


Link to post

I just had another thought, MongoDB has a rest API which might do the trick.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×