Micro Focus QTP (UFT) Forums
Connecting to MySQL to retrive data ! - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Connecting to MySQL to retrive data ! (/Thread-Connecting-to-MySQL-to-retrive-data)



Connecting to MySQL to retrive data ! - NancyNancy - 02-23-2011

I am following the example in QTP unplugged chapter 22

trying to connect to the DB, our DB runs on MySqL

Here is my Script

Code:
Dim adocon
Set adoCon = CreateObject ("ADODB.Connection")
ConStr = " DSN = name ; UID= admin ; PWD= 4d645df259f5cb14d0b65f8395f21ac47746845ae08719122210aa77 ; DataBase = My_DB "
AdoCon.open ConStr


Run Error =

Code:
Run Error [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Line (35): "AdoCon.open ConStr".

Does anyone tried this before?


RE: Connecting to MySQL to retrive data ! - basanth27 - 02-23-2011

Are you able to create a dsn on your machine with those credentials? I guess there is a website called www. Connectionstrings.com which has the info you require. I may be wrong about the site. If you dont please google for connection string for mysql.