Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Connecting to Database in a jar file  RSS feed

 
prasad appecherla
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to access a Database ( access.mdb ) in a jar file(test.jar )and tried to achieve that using following code.

...
String filename = "jdbcdbc:jar C:/test.jar)access";
String database = "jdbcdbcriver={Microsoft Access Driver *.mdb)};DBQ=";
database += filename.trim() + ";DriverID=22;READONLY=true}";

//get the connection from the DriverManager
con = DriverManager.getConnection( database);
...

Can anybody pls. tell me where I am making mistake? ( any syntax problem in using jar subprotocol? )

Thanks,
Prasad.

[edited to disable smilies]
[ December 01, 2004: Message edited by: Jeanne Boyarsky ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!