Forum Discussion
Almost seems like it's not possible, since I couldn't find much information online, I asked ChatGPT with a response "As it stands, it's unlikely that you'll be able to drop a MongoDB database directly from a TestComplete script using ADO and JScript.".
I've looked around and "mongodb://" connection string was not supported for ADOConnection.
Hi,
> I asked ChatGPT [...]
It lies pretty often...
and
might help.
In a nutshell:
-- ADO does not access data itself. ADO is a higher level interface that uses either native ADO driver or ODBC data source name (DSN) connection to access data;
-- It seem that native ADO driver for MongoDB does not exist. ODBC access is your only option if the above is correct;
-- In order to use ODBC, you need to: a) (find and) install MongoDB ODBC driver of some bitness (32- or 64-bit); b) create ODBC DSN connection using odbcad32 tool, tool must be started from either <windows>\system32\ (for 64-bit) or <windows>\SysWOW64\ folder (for 32-bit) depending on the bitness of installed MongoDB ODBC driver; c) set up ODBC DSN connection so that it can access data;
-- Craft ADO connection string using ODBC provider and the name of ODBC DSN like it is described in the referenced threads;
-- Use created ADO connection string to create ADO connection from your test code. Important requirement is that you must use TestComplete of the same bitness as installed MongoDB ODBC driver.
Related Content
- 12 years ago
- 13 years ago
- 8 years ago
Recent Discussions
- 6 days ago
- 6 days ago
- 9 days ago