how to retrieve the column headers in database using
vbscript statement in QTP
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 |
What is difference between function and procedure?
41 Answers HCL, IBM, iGate, Infosys, TCS, Veritas, Wipro,
How many scripts do you write per day. What is the average number of scripts you have written in your recent project
1 Answers CenturyLink, Optum, Value Labs,
In google i'm going to search something like "rose", i usually get 10 results in the first page and in 2nd page 10 results and in 3rd 10 results so on upto 10th page 10 results. so if i want to open all the 10 pages 10 results i.e., 100 results and close..what is the DP for this? pls can anyone answer my Question..PLZZZZZ...
Regular expressions..... Actually how to use this and what is the exact syntax and can anybody can help me out this with example.is there any docs pls send to my mailid rvreddy82@gmail.com
I wnnt to learn about QTP Automation Framework,please give URL Address to get more information about AFW.
7. Given scenario is like this: One Web table is there and you have to search and retrieve a cell data which is equal to the given number say:123. Assume you have given with the column name/id of the table where the number may exist. So now you have to go to the given column and search for the number 123 and retrieve it along with the row number of it.
How can we use regular expressions for a table in web page, each cell in table having unique identification, Now I want to count number of rows in table and enter data in all cells of the table?
We have 10 page.In first page we 2 popup and next page we 3 popup window......(windows name is different)how can we handle the all the popups without using recovery scenario
give one example where you have used regular expression?
I have to automate excel features using qtp in this i need to open instance of excel in different ways like double click on file, drag & drop options, File > open option but i know the 2 ways to open the excel instance 1 is by creating the object and another is to open the excel file in already opened instance of excel through sendkeys through qtp. But i m not geting how to open excel file through double click and drag and drop option through qtp script plz help me out anyone can thanks in advance
what type of scripts are asked in qtp?
can any body tell me all of the release dates of QTP?????..... thanks in adv!