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

if full in Object Repostoiory then how to load other Object Repository

2 Answers  


How to test a web application using QTP?there is no any .exe file in web app,then how we can take the application for testing

2 Answers  


hi nani my doubt is how does qtp process metrix related to software process.

0 Answers  


When do go for loop condition in test?

0 Answers  


I added 5 edit box objects in OR.i run the script and the first edit box successfully executed.But on next day when i executed same script for second edit box,it gives an error "object not Found". But when i used Highlight in app. object already in OR.So how i will handel this type of error. Hi please inform me the write answer.Its urgent.

1 Answers   TCS,


For an application we automated QTP scripts. At the same time new requirement comes for a new module for the same application and its already developed. So how we automated now this new module with the old application(using old QTP script).

2 Answers   Bosch,


Hi All,I am in wierd situation that my laptop is installed with QTP11 and os is xp sp3.The problem is the descriptive programming which i have written is working in other laptops and it is not working in my laptop.it is clicking the link which is above the testbox instead of typing it in textbox below it.It is same with the other working scripts written by another person.

1 Answers  


Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?

0 Answers  


what are the mandatory and assistive properties of objects in QTP?What is attached text?Plz assist me with proper answer.

7 Answers   MBT,


How can i use Ordinal identifiers and Smart identification methods suppose i want to know the index no of check box

1 Answers  


Hi. plz expalin abouit SetToProperty, SetRoProperty, GetToProperty, GetRoProperty,GetToPrperties. with examples.

6 Answers  


Please explain about unicode compatibility in QTP. how we can able to use it. Please help me

1 Answers  


Categories