• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

JDBC: ADD Data

Hey all,
I can setup a JDBC connection, and retrieve data (using "SELECT ..."). However, I'm not too sure on how to ADD data.

I have connected to a Microsoft Access Database. The TABLE is called "UserNotes". Which has the following headers:

StudentID          Username          Password          Notes
(AutoNumber)

How do I then ADD a Username, Password and Notes??

Thanks alot! :D
[r.D]
0
DrWarezz
Asked:
DrWarezz
1 Solution
 
sigmaconCommented:
Hi DrWarezz,

Assuming you already have a JDBC connection named conn (from your select statment):


Statement stmt = conn.createStatement();
stmt.executeUpdate("insert into UserNotes (Username, Password, Notes) values ('DrWarezz', 'secretpassword','DW is da man') ");


Good luck!
0
 
DrWarezzAuthor Commented:
:D Excellent -- thanks alot Signmacon.

[r.D]
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now