connection - RAD Embedded Derby database inside my project folder how to connect to database path -
i using derby embbeded database in rad ide. have created database inside project folder , connected by
class.forname("org.apache.derby.jdbc.embeddeddriver"); con = drivermanager.getconnection("jdbc:derby:i:\java programs\eappointment\webcontent\eappointment;create=true;user=subbu;password=");
but when send ear file superior. not running. database path error occurs.
can suggest me how overcome error.
might problem backslashes in java strings. you're not getting windows path separator, rather getting characters \j, \e, \w, , \e embedded string.
so you'd have double backslashes, or change them forward slashes.
and spaces in directory name going annoying, too, it's easier avoid them.
try starting making database @ root level of "i:" drive, in:
"jdbc:derby:i:/eappointment;create=true;user=subbu;password="
then once basic syntax working, can work on techniques more advanced control of database location.
Comments
Post a Comment