How to display the first 3 letters in these "ABCDEFGH" using
qtp script?

Answers were Sorted based on User's Feedback



How to display the first 3 letters in these "ABCDEFGH" using qtp script?..

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

How to display the first 3 letters in these "ABCDEFGH" using qtp script?..

Answer / rajesh

MyString = "ABCDEFH"
LeftString = Left(MyString, 3)
MsgBox LeftString

Is This Answer Correct ?    23 Yes 0 No

How to display the first 3 letters in these "ABCDEFGH" using qtp script?..

Answer / rekha

By using simple "LEFT" function you can diaply the first 3
chars

Is This Answer Correct ?    12 Yes 0 No

How to display the first 3 letters in these "ABCDEFGH" using qtp script?..

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

How to display the first 3 letters in these "ABCDEFGH" using qtp script?..

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

How to display the first 3 letters in these "ABCDEFGH" using qtp script?..

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

Post New Answer

More QTP Interview Questions

hi Friends ,willany body tell me what is the Scope for the automation Testing inht Future is their Or not And what is the Top Most Level in the testing section according the Pay scale

0 Answers  


Explain different type of event trigger option.

0 Answers  


How to set the function parameters as optional. Pls anybody can give the answer.. Thanks in advance...

2 Answers   Navis,


what r the main benefits of automation?

2 Answers  


can we call a test in another test?

3 Answers   iFocus,






Types of properties that Quick Test learns while recording?

1 Answers   Crea,


How to add synchronisation points in qtp?

0 Answers  


Could any one explain about the nested actions in QTP? This question is asked by Qualitree and CA

3 Answers   CA, Qualtree Solutions,


Mention the test steps of qtp.

0 Answers  


What is Optional step?

4 Answers  


str="QTP AUTOMATION TESTING" here how many T are there in the str finally i want to display the T

10 Answers   HCL,


How many types of actions are there in quicktest professional (qtp)?

0 Answers  


Categories