?
Solved

Connectivity of Java with Excel using JDBC ODBC

Posted on 2007-11-18
5
Medium Priority
?
1,081 Views
Last Modified: 2008-02-01
Hi All

I am using JDBC ODBC driver for connecting Java with Excel.
I am able to run insert, update, delete commands but when I am trying to use ALTER Table command it will give me following error:

Error!java.sql.SQLException: [Microsoft][ODBC Excel Driver] Invalid Operation

Can anybody please help..

Thansk in advance
Meenakshi Dhar
0
Comment
Question by:MeenakshiDhar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:MeenakshiDhar
ID: 20310597

private void alterTable()
	{
		Statement lStat=null;
		try
		{
			lStat=getConnection().createStatement();
			//lStat.executeUpdate("ALTER TABLE " +getTableName()+" ADD COLUMN DATA VARCHAR");
			lStat.executeUpdate("ALTER TABLE " +getTableName()+" DROP DATA_BASE");
			lStat.close();
		}
		catch(Exception e4)
		{
			System.out.println("Error!"+e4);
		}
	}

Open in new window

0
 
LVL 92

Expert Comment

by:objects
ID: 20310614
the driver does not support that operation
0
 

Author Comment

by:MeenakshiDhar
ID: 20310644
Is this for sure that JDBC ODBC driver does not support that operation..If yes, then  is there any alternative way to do this task..
0
 
LVL 92

Accepted Solution

by:
objects earned 400 total points
ID: 20310821
its the M$ odbc drive that does not support it.
you would need to use an api (eg. jexcel) instead of jdbc
0
 

Author Comment

by:MeenakshiDhar
ID: 20311045
Thanks a lot objects...
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month9 days, 9 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question