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

I want to test advanced Java applications what kind of add- ins I have to install?

1 Answers  


how do u handle an object without name using QTP 9.2?

0 Answers   CTS,


What are the benefits of quick test pro(qtp)?

0 Answers  


How can you delete the results file (XML)

2 Answers  


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

2 Answers   Broadridge,


How to use QTP for Regration testing, plz tell as with short Example of login window? plz tell as....

2 Answers  


what are the design objects in qtp

3 Answers   Wipro,


What is TOM in QTP?

0 Answers  


The hybrid framework can be implemented for any application. Is it true?

0 Answers  


How do you invoke an application using the step generator in qtp?

5 Answers  


how did u use automating testing tools in ur job?

0 Answers  


How to retrieve the object properties at runtime without the usage of GetROProperty?

3 Answers   Cap Gemini,


Categories