TestComplete and DB connection doesn't work on the Win-7 Virtual Machine
Hello,
I'm using the following connection string to connect TestComplete to AS400 database on my machine(WINDOWS 10). The connection works just fine. I'm not creating/using any DSN on my machine. I'm rather using the available driver - ' iSeries Access ODBC Driver'.
var conn = ADO.CreateADOConnection(); conn.ConnectionString = "Driver= {iSeries Access ODBC Driver};" + "Data Source = "+Project.Variables.Database+";" + "CurrentSchema=SHPR;" + "User ID= "+Project.Variables.ID+";" + "Password="+Project.Variables.Password.DecryptedValue+";"
Also, I'm trying to run all my tests on a virtual machine too which is 64-bit, Windows 7 machine. This machine also has the required driver available. In the beginning I was able to run the all the Tests on the virtual Machine when I was using a DSN(I created multiple DSNs), but later on I wanted to stop using the DSNs because I didn't want to create multiple DSNs on multiple machines and rather use the available drivers.
I tried using the same connection as mentioned above, but it fails to connect to the database with the following error:
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified.
I'm trying to understand what's the reason behind it because the same connection works just fine on my local machine.
Any help would be appreciated.
Thank you
Abhi
Thank you for your reply, Robert! ODBC was already configured, but now it seems I was making some mistake in the connection string itself.
I had to replace 'Data Source' by 'System' , and it worked fine on the Virtual Machine. I believe the system thinks of DSN when it sees ' Data Source' in the connection string.
Thank you
Abhi