Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

MAXDB

  Asked By: Dale    Date: Sep 02    Category: Java    Views: 629
  

I am using MAXDB 7.6 on Windows
I want to connect to this database using Java (JDBC / Hibernate)

I am using sapdb.jar as the jdbc driver.

But i am not able to connect to the database.

I get Invalid swapping error
I also get wrong username/password combination error

Can anybody plz guide me to connect to maxdb using java

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Gerald Cruz     Answered On: Sep 02

I am using MAXDB 7.6 on Windows
I want to connect  to this database  using java  (JDBC / Hibernate)

I am using sapdb.jar as the jdbc  driver.

But i am not able to connect to the database.

I get Invalid swapping error
I also get wrong  username/password combination  error

Can anybody plz  guide me to connect to maxdb using java

 
Answer #2    Answered By: Zoar Mizrachi     Answered On: Sep 02

If you wanna using jdbc  you should first install maxdb driver  for windows
and then using jdbc:odbc to connect  to it :


try {
Connection connection = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

String serverName = "localhost";
String portNumber = "1521";
String sid = "orcl";
String url = "jdbc:odbc:orcl";
String username = "kunal";
String password = "kunal";
connection = DriverManager.getConnection(url, username, password);
} catch(SQLException se) {
se.printStackTrace();
}

 
Didn't find what you were looking for? Find more on MAXDB Or get search suggestion and latest updates.

Related Topics:



Tagged:  

 

Related Post