October 25th, 2013, 05:19 PM
Creating a DataSource
Hello, can you help me?
I have already read many tutorials and code examples but I don't manage to create a DataSource in Java!
I have put the driver into the lib-Folder of my Eclipse workspace and Eclipse knows about that (I added the jar file to my project). The driver has the name hsqldb.jar, the classpath is org.hsqldb.jdbcDriver
How can I create a DataSource to read and write databases? I think, the second step (dataSource.getConnection()) won't be any problem, but my problem is the first step. Just for your information: The driver is not the problem: With a DriverManager, I don't have any problem; I can create, change and delete (drop) databases without any problem, but with the DataSource, I'm going to become desparate directly at the beginning...
Can you write my the lines for creating a DataSource? Thank you very much in advance!!!
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!