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
What are the technologies supported by qtp?
Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar
I am getting the "test object property" Description properties "toolkit class" value By using "gettoproperty" in run time But my problem is how to get Ordinal Identyfier's type and value Type is index, value is 0 How can i keep this values in to required place How can i get these values in runtime I have to insert these "index" and "value" into another area Is there any script for this like "gettoproperties","Getroproperties" If anybody knows,please help me .
Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)
what is run action?
Dear Friends, I having total 3+year experience in manual testing including automation testing QTP, if i am attending any interview what kind of question will i get? please help me out
By using QTP can we record any log files written by the application which is in execution?
Discuss the QTP Environment?
How do you synchronization point through DP?
How to get Traceability matrix from TD?
How to test login module with different username and password by using data driven testing in QTP?
How is test case write?
What is fragmentation and paging?
How to creating an output value using quicktest professional?
What is QTP and the use of QTP in TD?