Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to retrieve the column headers in database using
vbscript statement in QTP



how to retrieve the column headers in database using vbscript statement in QTP..

Answer / 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

More QTP Interview Questions

In QTP for .net application which plug in is used? For Java Application which plug in is used ?

2 Answers   AppLabs, Fraze Tech,


Hi..friends can anybody write the script for this question... Am having some 20 nos of links in a web application, i want to click some 5,13 & 17th links. So please....can anybody give the answer....??? -->Hani<--

4 Answers  


i have to prepare qtp certification course. so, please send me qtp tutorial notes.

1 Answers  


results.xls file is automatically generated while running the script in QTP.But it is showing error to open the file

1 Answers  


Please explain about unicode compatibility in QTP. how we can able to use it. Please help me

1 Answers  


How we can add objects to the object repository during the running?is it possible or not?explain

3 Answers  


what is test scheduleling?

0 Answers   IBM,


What is iteration? How it is related to Test Results in QTP?

2 Answers  


What is vulnerability?

1 Answers   CTS,


Can any body please tell me the steps of keyword driven framework of QTP.

0 Answers   TCS,


how to test Web application using QTP software

0 Answers   Google,


What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?

0 Answers  


Categories