Posts

Showing posts from July, 2018

Create a desktop application using h2 (embedded) Days 2

Image
C. CONNECTION Source code : As a example here the explanation :  "jdbc:h2:~/bansos","","" Driver name when we insert the J DBC URL is bansos. And the first Quotation marks belongs to username and the second belongs to password.

Create a desktop application using h2 (embedded)

A. MAKE A NEW PROJECT 1. First, create new project using  netbeans 2. Choose Java Fx category 3. Choose Java Fx Application and write the project name 4. You can deselect box of Create Application task 5. And Finish. B. MAKE H2 DATABASE 1. Click the Services Window 2. Right click in Drivers 3. And then add the driver file ( h2.jar). 4. After add h2.jar,  Name of driver will automated fill "H2 Database Engine" 5. Then click OK 6. Right click in Databases and choose new Connection 7. Choose Driver H2 Database Engine in dropdown list 8. Then insert h2.jar and next. 9. Insert username and password ( this is optional ) 10. Insert JDBC URL (jdbc:h2:~/(name of database)) example : jdbc:h2:~/Javafx 11. We can Test Connection with Click the button. 12. If it succesfull there is a alert " Connection Succeeded. " 13. Then we can click Next 14. The last step is choose a scheme. Select Public in the dropdown list. 15. And Finis