Hi John English and thank you for help. I caught SQLException and he said that : "No suitable driver found for jdbc:derby:MoneyBack1;create=true;user=miltone;password=password"
I have corrected the comma in my string for create table in Derby but this error coming back. However I created database in Derby with ij tool with this command :"connect 'jdbc:derby:MoneyBack1;create=true'; I have inserted value in table and try access those value with select statement. All is good in derby ij. My derby path is in jdk 7 db directory. In my code I tested lot with different connection string but always the same error hereabove. Like as : - String connectionURL = "jdbc:derby:" + dbName + ";create=true;user=" + user + ";password=" + password ; - String connectionURL2 = "jdbc:derby:" + dbName + ";create=true;user=" + user; - String connectionURL3 = "jdbc:derby:" + dbName + ";user=" + user; - String connectionURL4 = "jdbc:derby:" + dbName; -----Message d'origine----- De : John English [mailto:john.fore...@gmail.com] Envoyé : samedi 23 février 2013 14:50 À : derby-user@db.apache.org Objet : Re: DriverManager.getConnection error with JDK 7 On 23/02/2013 13:21, john miltone wrote: > String connectionURL = "jdbc:derby:" + dbName + > ";create=true;user=" + user + ";password=" + password ; > Connection connexion = > DriverManager.getConnection(connectionURL); Oops, replied too hastily... didn't notice this: > DriverManager.getConnection throw a exeception always. Difficult to say unless you provide details of the error message for the exception. Does the connectionURL work if you connect with IJ? Is the dbname a relative or absolute directory name? If it's relative, are you in the correct current directory when you try and connect? HTH, -- John English