Forum Discussion
- sbkeenanFrequent Contributor
Hi MikeX3215
Yes, mySQL is supported by TestComplete - I use it all the time. I think you might just have a problem with your connection string.
Because I need to connect to different databases, I have a getConnString routine that builds the connection string. In that routine, I use the following:
connString = "Driver={MySQL ODBC 5.1 Driver};" + "server=" + serverIP + ";" + "User=" + userID + ";" + "Password=" + password + ";" + "Option=3;";
Where I need to connect to the database, I use something like:
connection = ADO.CreateConnection(); connection.ConnectionString = MyUtilities.getConnString(); connection.Open(); cmd = ADO.CreateCommand(); cmd.ActiveConnection = connection; cmd.CommandText = "<SQL Query Here>"; cmd.CommandType = adCmdText; rs = cmd.Execute();
It hasn't failed me yet!
Hope this points you in the right direction.
Regards
Stephen.