Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

JDBC: ADD Data

Posted on 2004-10-24
2
Medium Priority
?
185 Views
Last Modified: 2010-03-31
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
Comment
Question by:DrWarezz
2 Comments
 
LVL 8

Accepted Solution

by:
sigmacon earned 2000 total points
ID: 12392214
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
 
LVL 9

Author Comment

by:DrWarezz
ID: 12392228
:D Excellent -- thanks alot Signmacon.

[r.D]
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question