Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

sapdb to oracle conversion with jdbc?

  Asked By: Rufus    Date: Nov 18    Category: Java    Views: 667
  

I was using jdbc to connect sap db,
I used to do same with following code.

DriverManager.registerDriver(new com.sap.dbtech.jdbc.DriverSapDB());
m_DBConnection =DriverManager.getConnection
("jdbc:sapdb://192.168.21.47/databasename?sqlmode=ORACLE&user=username&password=\
password"
);

now I want jdbc connection to the oracle.

i registered correctly with
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver() );

now for connecting to oracle with single connection string argument for
m_DBConnection =DriverManager.getConnection (String url);

what must be the string????
if you need mmore information regarding problem please mail me
Please help me with your suggetions

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Viola Hanson     Answered On: Nov 18

People normally do:
Class.forName("oracle.jdbc.OracleDriver");

con = DriverManager.getConnection(
"jdbc:oracle:thin:@hostname:1521:db", "www_user", "www_user" );

I've also seen 'dnldthin' instead of 'thin'. Mysql is using so well
for me these days, I see little need to use Oracle. Just can't get
any large contracts any more these days anyway.

 
Didn't find what you were looking for? Find more on sapdb to oracle conversion with jdbc? Or get search suggestion and latest updates.




Tagged: