Hello,

Please send me the equivalent code for the following
i.e the Database connecting code is written for MS Acess

I want to know for Oracle.


Class.forName("jdbc:odbc:dsnName");

Connection con=DriverManager.getConnection("jdbc.odbc.JdbcOdbcDriver","","");


can we use the same code(The above given) to connect to SQL Server.

With warm regards,
Azmat

Hello,

Please send me the equivalent code for the following
i.e the Database connecting code is written for MS Acess

I want to know for Oracle.


Class.forName("jdbc:odbc:dsnName");

Connection con=DriverManager.getConnection("jdbc.odbc.JdbcOdbcDriver","","");


can we use the same code(The above given) to connect to SQL Server.

With warm regards,
Azmat

u can either give the dsn name as in case of sql server or can give the ip address + port no of ur db server and then try to connect

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.