FAQ |
Calendar |
![]() |
|
Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman. |
![]() |
|
Thread Tools |
#1
|
|||
|
|||
![]()
alo agan2, dsini ad yg perna pake javaDB/ derby gak buad database? gw mo nanya ttg Derby Network Server neh hehehe http://db.apache.org/derby/ critanya gw lg bikin 1 desktop application dgn database derby, pake IDE netbeans nah biasanya kan gw sblm konek ke database, kudu nyalain servicenya Derby Network Server scara manual di netbeans (Service -> JavaDB -> Start Server) cuma gw mo nyalain Derby Network Servernya di application gw lsg, ini code yg gw pake buad jalanin derby server: Quote: NetworkServerControl server = new NetworkServerControl(InetAddress.getByName("localh ost"), 1527); server.start(null); ini yg buad ngambil connection Quote: private static String dbURL = "jdbc:derby://localhost:1527/Insurance"; .. //code laen .. //code laen conn = DriverManager.getConnection(dbURL, props); singkatnya, pas gw jalanin application gw, Derby Network Servernya seh nyala & connectionnya pun dapet (uda gw tes print connection object nya), tapi tabel2 data di application gw kosong melompong gw juga ada nyoba jalanin Derby Network Server di cmd pake command ini Quote: java org.apache.derby.drda.NetworkServerControl start hasilnya sama kyk yg diatas, Derby Network Server nyala & dapet connection tp tabel2 di application gw tetep kosong itu kira2 permasalahannya dimana ya agan2? kesimpulannya, nge-start up serverny pake 3 cara (1. manual; 2.lwat code di aplikasi; 3.lwat cmd), sama2 nyala servernya, tp bedanya klo pake cara 1 gk ada masalah, klo pake cara laen tabel2ny kosong melompong UPDATE: schema database gw namanya abyss888 nah pas gw connect ke server lwat code java, trus gw coba akses database lwat program gw, dapet error : Quote: org.apache.derby.client.am.SqlException: Schema 'ABYSS888' does not exist klo dr feeling gw, bedanya nyalain server derby lwat 'service' di netbeans ama lwat code di program gw, database path file yg direfer ama programnya beda mohon bantuanny agan2 ![]() Terkait:
|
![]() |
|
|