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
Hi can anybody send me the QTP material, To my email ID: nuve1284@gmail.com ?
What are the types of data tables in qtp?
How to handle Java tree in QTP?
how will you load the test cases in ddt?
Does QTP record on Objects created on XWindows Environment?
What is Cross browser testing? Does UFT support it?
What are the different attribute used with regular expression?
In Remote acess server how u run a test?
Explain in brief about the qtp automation object model (aom).
Explain the check points in quicktest professional (qtp)?
How many types of recording modes are there?
can anyone tell me what to say in interview when interviewer asks about "tell me about your framework in your project"?
how can we test the Triggers, Cursors, Indexes while doing Database testing in DTP??
what are the challenges you have faced while testing web based application using the automation tools ?
I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format. Hence, if possible, kinldy mail PDF file to my mail-ID: sushmapokhriyal79@gmail.com