how to retrieve the column headers in database using
vbscript statement in QTP
Answer Posted / akothuru
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 |
Post New Answer View All Answers
tell me QTP standards ?plz
What is action? How many types of actions are there in qtp?
What are the types of object repository in qtp?
How to customize checkpoints with parameters?
How to use descriptive programming?
Explain the N-tire structure(process) for Funds Transfer ( means give N ways to funds Transfer in an Application)
What is the difference between run time object and test object?
Can we create user defined functions in qtp?
What are the types of object repositories? Which one is you using?
Where should i find checkpoint and virtual objects's Object properties and values in the QTP 9.2 Means where checkpoints or virtual objects related data will store If i want to get the runtime object properties how can i use Getroproperties on Checkpoints
How to use the object spy in quicktest professional 8.0 version?
For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?
For which type of projects the iterative model is not suitable?
how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer
Describe synchronization point.