| 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
|
|
||||||||||||||||||||||||||||||
|
Home | JSP | EJB | JDBC | Java Servlets | WAP | Free JSP Hosting | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs |
||||||||||||||||||||||||||||||
Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.
Copyright © 2007. All rights reserved.
Current Comments
3 comments so far (post your own) View All Comments Latest 10 Comments: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";
try
{
Class.forName(driver);
conn = DriverManager.getConnection(url,"","");
try
{
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)
{
e.printStackTrace();
}
}
}
Posted by ion on Tuesday, 07.31.07 @ 15:19pm | #22302
Hi
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