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 |
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.
difference Between Call Run action and copy of action?
How to find duplicates in an array and remove them efficiently?
what is TOM in qtp?
How do you send email with attachment from outlook using qtp ?
I need your help in the below topic using QTP Automation tool. How to automate the right click of mouse on a context menu? 1)Tried low level recording which is working fine but making use of co-ordinates. 2) Also tried changing the mouse settings and properties using Tools ->WebEvent RecordingConfiguration and created a configuration file with required mouse click events and used which did not work.
Plz write the code, function will take the parameter as month number, i.e., numerical value, but it returns the last day of the month in string (weekday). example: input: function parameter: 3(march) output: thursday
How do you test the different ads displayed in the Inbox home page of Yahoo. Once u login Yahoo mail, in inbox page there will a banner, where different ads are scrolling, how do you test that using qtp?
Whenever we use GETROPROPERTY function.
i have read that "non-reusable actions can not be called in any other test".but in 'call to copy action' copies non-reusable action in other test also..can u pls help to understand this..
Can I use datatable of Action1 in the Action2.
Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?