Want to establish mongodb connection with VBScript and perform database operations with the scripts. It's possible with MYSQL DB but don't really know if we can do the same with mongodb or not.
1 Answers
VBScript is based on (30 years old) COM. I don't think you can get it out of the box, see MongoDB Drivers and ODMs
I would see two possibilities.
Use the MongoDB C# Driver. However, you need to compile it by yourself with "Make COM visible".
See How to call C# DLL function from VBScript for more details.
Use an ODBC driver. Downside, the free MongoDB ODBC driver works only for MongoDB Atlas, e.i. the MongoDB Cloud service. You need to buy a 3rd pary ODBC driver, see Mongodb - connect through ODBC
Update:
Meanwhile it seems to work (or I was too stupid to make it running the first time).
You can download and install the MongoDB BI Connector. Once the mongosqld
is running and schema is created, you can install the MongoDB BI Connector ODBC Driver. After you added the ODBC DNS, you can query the MongoDB the same way as you do it for MySQL.

- 54,457
- 9
- 76
- 110