Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML


Java Tutorials



Struts Tutorials

Struts Resources

Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Jdbc Jdbc Mysql InsertValues

User Comments
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl
  Blink   Furl   Simpy   Y! MyWeb 

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

7 comments so far (post your own) View All Comments Latest 10 Comments:

hi sir,

how to insert a table and i want syntax by using forms and how to access the data either by using any variables or jTextField1... here is my syntax by there are errors
int val = st.executeUpdate("INSERT bio VALUES("'+jTextField1+'","+"'+jTextField2+'","+"'+jTextField3+'"+"'+jTextField4+'"+"'+jTextField5'+"+"'+jTextField6='"+"'+jTextField7'+"+"'+jTextField8+'"+"'+jTextField9+'")");

Posted by udhaya on Saturday, 08.28.10 @ 09:35am | #99228

sir i would like to ask how to insert records using columns with more than 3 columns of different data types? string, integer, float and string again...

thanks..i would like to here from u asap

Posted by jerralyn on Tuesday, 09.15.09 @ 09:25am | #90918

How to write a piece of code which will help one end user to search a record if the record is to be searched by its attribute level, wanted to say that the site is an absolute informative

Posted by Lahori Chakravarty on Monday, 03.16.09 @ 07:22am | #85899

what is the use of "+" sign?

Posted by Abhineet on Wednesday, 08.13.08 @ 22:31pm | #72696

Sir can we know the exact code of
Inserting a record on Employees Table?

Thank you

Posted by rey on Wednesday, 12.19.07 @ 13:31pm | #42940

This is my script exactly how you done it but i've got one error:"The statement SQL isn't executed General error";WHY?
import java.sql.*;
class JDBCex

public static void main(String[] args)
System.out.println("Inserting values in MS Access database table!");

Connection conn = null;

String url = "jdbc:odbc:formular";
String driver = "sun.jdbc.odbc.JdbcOdbcDriver";

conn = DriverManager.getConnection(url,"","");

Statement stmt = conn.createStatement();
int val = stmt.executeUpdate("INSERT INTO angajati VALUES("+13+","+"'ion'"+","+"'ion'"+","+"'ion'"+" )");
System.out.println("1 row affected");

catch(SQLException e)
System.out.println("SQL Statement isn't executed " + e.getMessage());
catch(Exception e)


Posted by ion on Tuesday, 07.31.07 @ 15:19pm | #22302

In this example some mistake is there in sql command

Insert into tablename values() but it is Insert tablename values()..
so please correct it.

with regrds,
pavan kumar chelluri

Posted by pavan kumar chelluri on Sunday, 07.8.07 @ 10:52am | #20907

Ask programming questions?



Back to Tutorial


  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name


Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright 2007. All rights reserved.