Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
JDBC connection for UFT
#1
Not Solved Question 
Hi,

I am trying to connect to the JDBC database server using UFT.

But i am getting all kinds of error.

Below is code that i am using


import java.sql.*;
import java.math.*;
import oracle.jdbc.pool.OracleDataSource;


OracleDataSource ods = new OracleDataSource();

      ods.setUser("<user>");
      ods.setPassword("<pwd>");

ods.setURL("jdbc:oracle:thin:@<database name>");

Connection conn =
        new oracle.jdbc.OracleDriver().defaultConnection();
Connection conn = ods.getConnection();


It is giving me syntax error for import java.sql.*;

Also when using the connection string in API test than UFT is not able to find the drivers. Please help.


Regards,
Anjali
Reply


Messages In This Thread
JDBC connection for UFT - by Anjali09 - 10-05-2016, 02:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT:A connection with server could not be established with xml objects Lakshman.Repaka 0 2,127 01-01-2018, 10:42 PM
Last Post: Lakshman.Repaka
  UFT 12.02 encrypted password for ALM connection issue psova 0 2,591 07-29-2015, 02:59 PM
Last Post: psova
  QTP connection to QC kirangoud 4 15,434 03-02-2012, 03:36 PM
Last Post: kirangoud
  QC-QTP Connection failure uma87 1 3,842 02-28-2012, 03:48 PM
Last Post: inborntester
  SQL Connection String with DSN geethwind 0 5,961 10-05-2011, 05:10 AM
Last Post: geethwind

Forum Jump:


Users browsing this thread: 3 Guest(s)