Hi,

I am sending the code for SQL server connection in QTP. Oracle connection
also same like that. Try it and tell me .

Regards..

Venkat
On Wed, Dec 3, 2008 at 9:38 AM, mrinal rao <[EMAIL PROTECTED]> wrote:

> Hi Venkat,
>
> Please share the code.
>
>  On Tue, Dec 2, 2008 at 9:45 PM, venkata koduri <[EMAIL PROTECTED]>wrote:
>
>> Hi,
>>
>> We can directly import the oracle table in to QTP.
>>
>> If u want I will provide the code.
>>
>> Regards...
>>
>> Venkat
>>
>> On Tue, Dec 2, 2008 at 5:53 PM, praveen kumar <[EMAIL PROTECTED]>wrote:
>>
>>>
>>> But still i have to use some tools to import oracle data to a excel
>>> sheet, Is there is any other way to figure it out...
>>>
>>> Thanks
>>>
>>> Praveen
>>>
>>>
>>>
>>
>>
>> --
>> Regards..
>> Venkataraju.K
>> Mobile : 9848231030
>>
>>
>>
>>
>
> >
>


-- 
Regards..
Venkat

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

'Database connection by using SQL Server 2000

Dim con,x,y,r,z,rs

DataTable.AddSheet ("Raju").addparameter "name"," "
DataTable.AddSheet("Raju").addparameter "number"," "

r=DataTable.GetCurrentRow

Set con=CreateObject("ADODB.Connection")
Set rs=CreateObject("ADODB.recordset")

con.open "provider=sqloledb.1; server=localhost;uid=sa;pwd=sa;database=master"

rs.open "select * from raju", con

Do while not rs.eof
        x=rs.fields("sname")
        y=rs.fields("sno")

DataTable.SetCurrentRow(r)

DataTable.Value("name",3)=x
DataTable.Value("number",3)=y

InvokeApplication "C:\Program Files\Mercury Interactive\QuickTest 
Professional\samples\flight\app\flight4a.exe"
        
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set x
Dialog("Login").WinEdit("Password:").SetSecure 
"4913e60bebc7db4ca7a71ca710675b8cec76d04e"
Dialog("Login").WinButton("OK").Click
wait(15)
Window("Flight Reservation").Activate
Window("Flight Reservation").WinMenu("Menu").Select "File;Open Order..."
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set 
"ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set y
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
Window("Flight Reservation").Close
r=r+1
rs.movenext
DataTable.SetNextRow
 
Loop

Reply via email to