Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
How to connect to SQL Server 2005 database from QTP
im ObjDB
Set ObjDB= Create Object("ADODB Connection")
ObjDB.ConnectionString = "DSN=Database Name"
ObjDB.Open
StrQuery = "Select * From Table Name Where Condition for query"
Set ObjResult = ObjDB.Execute(StrQuery)
After I run the script in QTP. I'm getting the following error message
"The test run cannot continue due to a syntax error.
Expected end of statement"
or Detail error message
"Line (3): "Set ObjDB= Create Object("ADODB Connection")"
Thanks
Yared
Related Answered Questions
Related Open Questions