Ask a Question

TestComplete: Database connection error (SQL Server does not exist or access denied)

Super Contributor

TestComplete: Database connection error (SQL Server does not exist or access denied)

Hi All,


While trying to open connection for SQL Server, I am getting below error -


[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.


Normally I am able to connect and access database on my machine (same machine where is TC throwing error).


I have tried both ConnectionString as well as DSN.  (here I am using ADODB.connection & ADODB.Recortset)



(I did same with Oracle DB and it's work for me)


Is there any additional setting required for connect to SQLServer DB.





Super Contributor

same issue 😞

You sure your connection parameters are all correct?


I'm connecting to a local SQL DB no problem. Reads, updates, inserts ... all fine. Using ADODB + connection string.


Win 7 Pro 64 bit in a VM. SQL 2008 R2. TC 11.20.


All works just fine?



Thanks for update, as per my knowledge all are correct, let me check & confirm once again with "Dev Team" for connection string.

Meanwhile I have setup "Microsoft Access Database Engine 2010" it might help.




Super Contributor

It is working now.


The problem with ODBC32 & ODBC64 bit I have create DSN in ODBC32 and while execute query it's work but trying to execute same in TC it was showing error. Now I have create DSN in SysWOW64 and ran same code. it's work.


In connection string part now I added below statement it is also work.


ObjRecortset.CursorLocation = 3
ObjRecortset.CursorType = 3
ObjRecortset.LockType = 4



Thanks All of you for your suggestions 🙂




TestComplete can use only 32-bit database drivers to connect databases. It does not support 64-bit database drivers. This is due to the fact that TestComplete is a 32-bit application, so it cannot load 64-bit modules into its process. Thus, in order for TestComplete to be able to access a database running on a 64-bit client machine, 32-bit database drivers must be installed on the machine.

If you use the Microsoft Open Database Connectivity Data Source Administrator tool to connect to a database on a 64-bit operating system, make sure that you use the 32-bit version of the tool, Odbcad32.exe (it is in the <Windows>\SysWOW64 folder). Otherwise, the tool will not be able to detect the needed 32-bit database drivers.



Showing results for 
Search instead for 
Did you mean: