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 is the use of dialect?

565


Is jdbctemplate thread safe?

484


What driver should I use for scalable Oracle JDBC applications?

503


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

488


What is CLOB and BLOB datatypes in JDBC?

558






Explain how to make updates to the updatable resultsets.

505


How can we retrieve the file in the oracle database?

513


What are the different types of interfaces in the api component?

518


Is jdbc object oriented?

501


How does a custom RowSetReader get called from a CachedRowSet?

572


What is the use of setFetchSize() and setMaxRows() methods in Statement?

520


What is meant by jdbc?

523


What is jdbc connection?

651


What is an advantage of using the jdbc connection pool?

451


How do I find whether a parameter exists in the request object?

495