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 many types of recording modes in the qtp?
Question:how many types of repositories in QTP9.2?and explain??
how to write regular expression for Date field?
I am trying to read the rediffmail usign the below code. But facing problem, while i user to get the link of the mail, i am getting all the link of the page, While i just want to get only mail name - link (not all the link of an page) so that i able to read the mail message by clcking on them in qtp. Dim Lnk,Webcheckbox Set Lnk= Description. Create '********* To count and display the webcheckbox Lnk("micclass" ).value=" Link" set LinkName= Browser("Welcome to Rediffmail:" ).Page("Welcome to Rediffmail:" ).ChildObjects( Lnk) LinkCount=LinkName. Count msgbox LinkCount For i=1-1 to LinkCount-1 DataTable.SetCurren tRow(i) DataTable.Value( "Name",1) =LinkName( i).GetRoProperty ("name") Next Waiting for the reply Praveen Saini
what is input pramater out output pramater ?i want the decrepation..?how to use in QTP?
3 Answers Infinite Computer Solutions,
What is test object model in QTP ?
Which features or drawbacks of QTP lead to the upgrade for a newer version?
As u told write Libarary files in QTP. Do u use ever oject repositary 0r spy while writing scripts and for which type of testing u prepared test scripts.
What is object spy in quicktest professional (qtp)?
Explain how you can find length of array in qtp?
What is diff. between ordinal identifier INDEX and Location?
How many ways we can parameterize data in QTP?