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 |
I want to test advanced Java applications what kind of add- ins I have to install?
how do u handle an object without name using QTP 9.2?
What are the benefits of quick test pro(qtp)?
How can you delete the results file (XML)
In Developer view it is a high priority defect & in tester view it is a low severity defect what is that how to define with an example
How to use QTP for Regration testing, plz tell as with short Example of login window? plz tell as....
what are the design objects in qtp
What is TOM in QTP?
The hybrid framework can be implemented for any application. Is it true?
How do you invoke an application using the step generator in qtp?
how did u use automating testing tools in ur job?
How to retrieve the object properties at runtime without the usage of GetROProperty?