UFT with Database integration

Hello guys 

I need advice about uft connection with database. Case is: 1. make any transaction in web application 2. copies value while test running in web application 3. then opens plsqldev.exe 4. open new sql window 5. writes any query using above value 6. run it 7. checks table 

1. I think all these actions can be performed by using *devicereplay* objects and *systemutil* command? please see my question named UFT 14.03 

2. Make a database connection

What do you think about 1st way guys? pls share your experience 

thanks,

Gan-Orgil 

  • Hi,

    Why would you want to run your queries in a seperate application instead of running them through the UFT using database connection strings..?
    Example: (oracle db)
     Opening the connection the database in the correct environment and opening a recordset
            Set objDB = CreateObject ("ADODB.Connection")
            objDB.Open ("Driver={Microsoft ODBC for Oracle}; Server = "& dB_ENV &";Uid= " & dB_Usr &"; Pwd = " & dB_Pswd & ";")
            set recordset = CreateObject ("ADODB.Recordset")  
            On error resume next
            ' run the query and disable the error control
            set recordset = objDB.execute(dB_Query)

    Do Until recordset.EOF         

        <code to loop through your query results>

    Loop
         

    Makes sense to you ?

     

     

  • Addinf to Liorde's great post you also need to have an ODBC driver installed.

    Mark Smith.