How to display the first 3 letters in these "ABCDEFGH" using
qtp script?
Answers were Sorted based on User's Feedback
Answer / manas
These script display the first 3 letters in that given
string:
Dim str , substr
str = "ABCDEFGH"
substr = mid(str,1, 3)
print substr
| Is This Answer Correct ? | 31 Yes | 3 No |
Answer / rajesh
MyString = "ABCDEFH"
LeftString = Left(MyString, 3)
MsgBox LeftString
| Is This Answer Correct ? | 23 Yes | 0 No |
Answer / rekha
By using simple "LEFT" function you can diaply the first 3
chars
| Is This Answer Correct ? | 12 Yes | 0 No |
Answer / gnani
Thanks a lot for your answer.
I have one more question which is asked in oracle, can you please send the answer.
Q:There are 4 columns and 10 rows, how to show the first column records using qtp script?
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / manas
Dim Conn, rs, ListOfRecords, x
' Connect to the Microsoft Access Database by createing a
object
set conn=CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/DataBase1.mdb" ' ex: Name of DataBase is
DataBase1.mdb
' Retriving data from Access using the SQL Query
' Column_name1 - Suppose first column
' Table - Suppose Name of Table
set rs=CreateObject("ADODB.recordset")
rs.Open "Select Column_name1 from Table", conn
for each x in rs.Fields
ListOfRecords = ListOfRecords & x.Column_Name1 & vbCrLf
next
MsgBox ListOfRecords
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / tvs ramakrishna chowdary
'every thing is correct up to query passing
'after that follow below code
rs.open "select column_name1 from table",conn
do while not rs.EOF
msgbox rs.fields(0)'here column count stards form 0
(or)
msgbox rs.fields("column_name1")'instead of column no we
can use column name also
next
| Is This Answer Correct ? | 0 Yes | 1 No |
Please mail me the license key of QTP 9.5 t v.sadangi@gmail.com ????? thx
wat are views in qtp explain
what is the automation framework that ur company using(actual procedure,not theoritically explination)
In automation testing, while doing descriptive programing; how will u get the properties of the objects in what format, what type of a document, and by whom? Pls explain in detail. Thanks a lot
Can any body help me to write descriptive program to find a cell value (say 2 row, 3rd column) in a datatable which is creating dynamically and statically
how to reverse the string without using bultin functions(i.e mean mid,len ,reverse functions)
What is obsolute path and relative path in QTP..? How to access them and what are the differences between them...??
A webPage has a ComboBox with 10 values in it. Write a script to select 4 vales from it using CTRL key
What VBScript operators, functions, and statements do you use in QuickTest Professional?
What is recovery scenario in qtp?
How to import the Test Results in QTP to an Excel sheet
How can we display the names of the buttons in the toolbar of a webpage