how to retrieve the column headers in database using
vbscript statement in QTP
VB Script Code to retrieve all column names
var_ConnectionString = "" 'specify the connection string
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open var_ConnectionString
Set objRecordSet = CreateObject("ADODB.RecordSet")
strSqlQuery = "select * from employee"
'Execute query and Store the results into Record set
objRecordSet.Open strSqlQuery, objConnection
For var_Loop = 0 To objRecordSet.Fields.Count - 1
colname = objRecordSet.Fields(var_Loop).Name 'column name
msgbox colname
Next
Is This Answer Correct ? | 8 Yes | 3 No |
How to export data present in Datatable to an ".xls" file?
Hi All, I wanted know how does QTP identifies a DataCombo. While recording I clicked on the data combo and selected a value from the list. The click of Data Combo is recorded but the selection of the value from the list is not recorded. My application is based on VB and SQL server as the database. Please let me know as how do I record the action of selecting a value from a DataCombo list. The list is being loaded from the Database Record set.
How can i count the list box elements in QTP ?using script plz explain me (Chandana)
Can objects recognised without repository?
Give me the Example of standard check point and text check point with syntax?
3 Answers IMI Soft, IMI Soft Engineering,
what is the criteria for choosing test cases for automation? Ex: if you have some 300 test cases, then how many you choose for automation. what is criteria of selecting?
3 Answers Aricent, Delhi University, TCS,
how u will describe testing activities?
What are the main features we have to compulsory test by using qtp in an web based application
Hi anyone having QTP 10.0 licence or crack version pls send me in this mail id mdilipkumar04@gmail.com Regards Dilip
what ar the challenges do we face while testing webbased applications using the automation tool qtp or any?
How should I get results when I run scripts in a Batch mode
How to break the object spy ?