what is the script(qtp) to export and import the datas from
MSaccess to Excel sheet.if anybody know plz tell me.
Answer Posted / king
Set a=createobject("adodb.connection")
Set b=createobject("adodb.recordset")
a.provider="microsoft.jet.oledb.4.0"
a.open "E:\raju\login.mdb"
b.open "select * from login",a
i=1
Do while not b.eof
If not dialog("Login").Exist(2) Then
invokeapplication "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"
End If
dialog("Login").WinEdit("Agent Name:").Set b("User
name")
wait(1)
dialog("Login").WinEdit("Password:").Set b
("password")
dialog("Login").WinButton("OK").Click
datatable.SetCurrentRow(i)
datatable(1,1)=b("User Name")
datatable(2,1)=b("password")
wait(1)
If dialog("Login").Dialog("Flight
Reservations").Exist(1) Then
dialog("Login").Dialog("Flight
Reservations").WinButton("OK").Click
datatable(3,1)="Fail"
dialog("Login").WinButton("Cancel").Click
else
datatable(3,1)="Pass"
Window("Flight Reservation").Close
End If
i=i+1
b.movenext
Loop
datatable.ExportSheet "E:\raju\db.xls",1
i think this is working properly
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
what is the difference betn QTP 8.0 AND PREVIOUS VERSION
Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?
What processes will be required to manage updates to the web site's content, and what are the requirements for maintaining, tracking, and controlling page content, graphics, links, etc.?
How to test background color and dynamic images during run time can you put the check point for moving objects?
what is meant by Implicit and explicit requirements?
When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.
What is the descriptive programming?
Does Low-level recording capture mouse movements?
Is it possible to split an action? How?
How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet
whow much strong on VB and C?
What are the steps involved in recovery scenario wizard?
Explain the differences between table and db checkpoints?
Did the scripts need lot of maintenance? If yes, why?
What are the advantages of Object Repository?