?INSERT in Oracle9i /Java w/ StringBuffer append?

Posted on 2004-10-29
Last Modified: 2010-04-17
How do I insert a record into Oracle using Java.  For example I have the keyi an SSN. I have to place an letter into a field and place a date into another field. The record is written for the first time.
Thank you in advance    
Question by:coolgem
    LVL 21

    Accepted Solution

    what do you mean by w/ StringBuffer append?

    The insert is simple:
    insert into table(SSN, updated) values('111-11-1111', to_date('12/12/2005', 'mm/dd/yyyy'))

    Using parameters would be better:
    insert into table(SSN, updated) values(?, ?)
    where the values ?, ? are set by parameters:

    Author Comment

    I was trying to do the INSERT in Java using the StringBuffer java class.  

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    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…
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    913 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now