Java Programming Connect to Database (JPCD)


JPCD:   SOLD       




CLUE:

1. Create a database and its tables
2. Relate tables

  • What is the function of a relationship?
  • Validation, so that master table records are not easily deleted.
  • Synchronization, so that when the master table is changed, the secondary table will also change.
  • When DELETE CASCADE is active or "ON" (optional), then when a master table record is deleted, the data in the secondary table is also deleted.

3. Create a Java project
4. Create a main form
5. Create a doctor form (dialog)
6. Create a patient form (dialog)
7. Instantiate the doctor and patient forms
8. Connect the database to the form

  • Library Input
  • Connection Process
  • Checking Server IP
  • mysql User & Password
  • Checking database
  • Query Command

9. Testing


How to Connect Java Netbeans to MySQL Database

DEMO:

https://youtu.be/z6B-jksppD4

Netizens

Q1:

AFIF VUDIN Jan 13 2016, 22:24:00\
asked... I've followed the steps in the video but why can't I save? it appears like this...

run:

java.lang.RuntimeException: Uncompilable source code - cannot find symbol
symbol: class MysqlDataSource
location: class gage.paser
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: jOptionPane.showConfirmDialog
at gage.paser.simpanActionPerformed(paser.java:96) at gage.paser.simpanActionPerformed(paser.java:96)
at gage.paser.access$000(paser.java:15)

A1:

There is a missing part in the MysqlDataSource class, maybe after copying a block of code you forgot to change the configuration, try checking again on the page paser->class save. Edit/adjust the parts that are necessary.

Thanks and good luck, happy studying


Post a Comment

Previous Next

نموذج الاتصال