Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connecting to Database in a jar file

 
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic