How to Import Export JavaDB(Database) in Netbeans?
![JavaDB JavaDB](http://1.bp.blogspot.com/-s-n5t9ciePc/UfPZ1MTLUAI/AAAAAAAAE6M/eFBFDLDXRcY/s200/Database_3.png)
- - Full-featured and easy-to-use
- - Transaction-protected and crash-recoverable
- - Embeddable in applications
- - Pure Java and portable and across CDC FP 1.1, Java 5, Java 6, and Java 7 (everywhere from tablets to mainframes)
How to create JavaDB in Netbeans?
Step 1: Open service explorer in netbeans and navigate to Database > JavaDB > Create Database
![JavaDB, Netbeans JavaDB, Netbeans](http://3.bp.blogspot.com/-C0ql1KNo2Co/UohQLO9a0FI/AAAAAAAAFhI/Po5GhVcxCm8/s400/1.png)
Step 2: Provide Database Name, Username, Password and Database location in next popup. You are done with database creation in JavaDB.
How to insert value in JavaDB in Netbeans?
If you are creating database for the first time in netbeans by following above steps. Then it'll show you the database instance right away. If you want to import it from other location then continue reading article till the end. I'm going to show you how you can import JavaDB in Netbeans.
Step 1: Connect the database instance that you created in above steps.
![JavaDB, Netbeans JavaDB, Netbeans](http://3.bp.blogspot.com/-ZFn0TbBSHdc/UohR52Iy-kI/AAAAAAAAFhU/RQCrZOMVFro/s400/3.png)
Step 2: You can create new schema in it. Or simple you can use APP schema. Open APP schema hierarchy > Table > Create Table
![JavaDB, Netbeans JavaDB, Netbeans](http://2.bp.blogspot.com/-y755x1tk2EE/UohSfqkA7nI/AAAAAAAAFhc/rc95SJjkCug/s400/4.png)
Step 3: Create table in next popup.
Step 4: Right click on table and Insert record in it or by program.
How to import JavaDB in Netbeans?
Step 1: Right click on JavaDB > Properties and change database location.
![JavaDB, Netbeans JavaDB, Netbeans](http://3.bp.blogspot.com/-sg-4LNRPbUI/UohUiWuiSbI/AAAAAAAAFho/klr6XF7YY7c/s400/11.png)
Step 2: Create New Connection.
![JavaDB, Netbeans JavaDB, Netbeans](http://2.bp.blogspot.com/-7tJVhB9K9x0/UohU-nlri_I/AAAAAAAAFhw/Y0qZKsv0cYM/s400/8+(1).png)
Step 3: Provide database credential in next popup and click on ok.
![JavaDB, Netbeans JavaDB, Netbeans](http://1.bp.blogspot.com/-js85cgjG_d0/UohVvkpbF8I/AAAAAAAAFh8/OsR03A5jeyI/s640/12.png)
the URL does not work when i tried to import on another PC in the same network. Anyone know what is the problem?
ReplyDeleteThe error is
cannot establish a connection to jdbc:derby://localhost:1527/MP using org.apache.derby.jdbc.ClientDriver (The connection was refused because the database MP was not found.)
http://www.javaquery.com/2010/10/how-to-use-oracle-database-in-java.html
ReplyDeleteCheck out the post and change the certain things in post like firewall and all if problem still exist than let me know.