hsauro 40 Posted August 2, 2022 (edited) 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 August 2, 2022 by hsauro Share this post Link to post
hsauro 40 Posted August 3, 2022 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
A.M. Hoornweg 144 Posted August 3, 2022 I am using this open source library to connect to MongoDB. It works quite well but it's a bit bare-bones: https://github.com/grijjy/DelphiMongoDB I've forked it and added some more functionality that I needed myself. https://github.com/tuurke63/DelphiMongoDB Share this post Link to post
hsauro 40 Posted August 3, 2022 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
hsauro 40 Posted August 3, 2022 I just had another thought, MongoDB has a rest API which might do the trick. Share this post Link to post
hsauro 40 Posted August 4, 2022 I managed to get REST API working on MongoDB atlas. Share this post Link to post