give me a java code snippet to connect Microsoft excel
through.... I am trying alot... plz help me.

Answer Posted / sushant

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String myDB = "jdbc:odbc:Driver={Microsoft Excel Driver
(*.xls)};DBQ=c:/java/scratch/jdbc_test.xls;"
+ "DriverID=22;READONLY=false";
Connection conn = DriverManager.getConnection(myDB, "", "");

Is This Answer Correct ?    19 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if connection is not closed in jdbc?

680


Can we return resultset in java?

655


Explain the necessary steps to connect to the database in java?

783


Which is better odbc or jdbc?

661


What is the role of jdbc drivermanager class?

802


How can you know about drivers and database information ?

731


Explain Basic Steps in Writing a Java Program Using Jdbc?

789


What are the differences between execute, executequery, and executeupdate?

694


How do you determine the sensitivity of the ResultSet object?

742


Which package is used for jdbc application?

734


What is in terms of jdbc a datasource?

745


What is jdbc odbc?

737


What is jdbc architecture in java?

685


What is encrypted connection?

731


What is jdbc template?

728