| 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
1 comments so far (post your own) View All Comments Latest 10 Comments: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