Home Tutorialhelp Comment it doesn't work

 
 

Comment

ion
it doesn't work,
July 31, 2007 at 3:19 PM

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();
}



}
}
View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
JDBC Questions

JDBC
between java and mysql using JDBC and saves the data into the database. import... con = null; String url = "jdbc:mysql://localhost:3306/"; String db...JDBC save a data in the database  I need a code to save a data 

JDBC Questions

JDBC
the connection between java and mysql using JDBC and saves the data into the database...!"); Connection con = null; String url = "jdbc:mysql://localhost:3306/"; String db...JDBC code to save a data in the database  I need a code to save 

JDBC Questions

jdbc - JDBC
= null; String url = "jdbc:mysql://localhost:3306/"; String db... information on JDBC-Mysql visit to : http://www.roseindia.net/jdbc/jdbc-mysql... in JSP to create a table. 2)how desc can be written in JDBC concepts   

JDBC Questions

JDBC - JDBC
database table!"); Connection con = null; String url = "jdbc:mysql... implementing class.  Hi friend, Example of JDBC Connection with Statement interface : import java.sql.*; public class InsertValues{ public static 

JDBC Questions

JDBC - JDBC
JDBC  i am goint to work on JDBC and i knew oracle but very poor... ILLUSTRATIONS to understand the way to do work in JDBC with syntaxes  Hi... Connect Example."); Connection conn = null; String url = "jdbc:mysql 

JDBC Questions

JDBC doesn't provide an EOF method.
JDBC doesn't provide an EOF method.  How can I know when I reach the last record in a table, since JDBC doesn't provide an EOF method 

JDBC Questions

jdbc - JDBC
Deletion Example"); Connection con = null; String url = "jdbc:mysql://localhost...jdbc  jdbc Expert:Ramakrishna Statement st1=con.createStatement... values from table;)) At a time you can do one work. first time you can 

JDBC Questions

install mysql - JDBC
install mysql  i want to connect with mysql database.can i install mysql on local system please send me link how download mysql   Hi friend, MySQL is open source database and you can download and install it on your 

JDBC Questions

jdbc
(); Connection conn = DriverManager.getConnection("jdbc:mysql://localhost... information, visit the following link: JDBC Tutorials 

JDBC Questions

jdbc
driver = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://localhost:3306/test...jdbc  i had written jdbc connection in method and i need to get connection in another class?   import java.sql.*; class 

JDBC Questions

MySQL Driver for JDBC - JDBC
MySQL Driver for JDBC  Sir, I have started reading your JDBC tutorial for MySQL. I have installed MySQL successfully. But I do not have MySQL... Example."); Connection conn = null; String url = "jdbc:mysql://localhost:3306   

SQL Question

JDBC
").newInstance(); String connectionURL = "jdbc:mysql://localhost:3306/test";; Connection..."); Connection connect = DriverManager.getConnection("jdbc:mysql://localhost...retrieve the value from database into dropdown list using JDBC SQL 2005  

JDBC Questions

JDBC
").newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql://localhost...JDBC  write a JDBC program to display the result of any query on a student table in a JTable component.   import java.awt. 

JDBC Questions

jdbc
level can be set in JDBC. the method can accept any of the arguments listed below... work done after the savepoint. A save point is created using the method 

SQL Question

JDBC
= DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root 

SQL Question

JDBC
("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql 

Java Beginners

jdbc
= DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root 

JDBC Questions

jdbc mysql - JDBC
=DriverManager.getConnection("jdbc:mysql://localhost:3306/ram","root","root...jdbc mysql  import java.sql.*; public class AllTableName... be problem in your mySql, the above code is working fine. first you check 

JDBC Questions

JDBC - JDBC
://www.roseindia.net/jdbc/jdbc-mysql/MysqlConnect.shtml Thanks...JDBC  JDBC driver class not found:com.mysql.jdbc.Driver..... Am getting an error like this...... i have added the jar files for mysql inside 

JDBC Questions

jdbc - JDBC
at http://www.roseindia.net/jdbc/jdbc-mysql/ Thanks   Hi, You..."); Read at http://www.roseindia.net/jdbc/jdbc-mysql/MysqlConnect.shtml Thanks... management so i need how i can connect the pgm to database by using jdbc 

JDBC Questions

jdbc - JDBC
[] args) { System.out.println("MySQL Connect Example."); Connection conn = null; String url = "jdbc:mysql://localhost:3306/"; String dbName.../jdbc/ Thanks 

JDBC Questions

jdbc - JDBC
static void main(String[] args) { System.out.println("MySQL Connect Example."); Connection conn = null; String url = "jdbc:mysql://localhost:3306... on Netbeans and jdbc visit to : http://www.roseindia.net/jdbc/ http 

JDBC Questions

JDBC - JDBC
"); con = DriverManager.getConnection("jdbc:mysql://192.168.10.211...://www.roseindia.net/jdbc 

JDBC Questions

jdbc - JDBC
in a database System.out.println("MySQL Connect Example."); Connection conn = null; String url = "jdbc:mysql://localhost:3306/"; String dbName 

JDBC Questions

jdbc - JDBC
main(String[]args){ try{ Connection con = null; String url = "jdbc:mysql...(); Connection con = DriverManager.getConnection( "jdbc:mysql://localhost:3306/test...://www.roseindia.net/jdbc/ Thanks 

JDBC Questions

jdbc - JDBC
("com.mysql.jdbc.Driver"); Connection con=DriverManager.getConnection("jdbc:mysql://localhost... con=DriverManager.getConnection("jdbc:mysql://localhost:3306/ram","root","root... MySql visit to : http://www.roseindia.net/jdbc/jdbc-mysql/ Thanks 

JDBC Questions

jdbc - JDBC
= DriverManager.getConnection( "jdbc:mysql://localhost:3306/test", "root", "root...: http://www.roseindia.net/jdbc/save_image.shtml Retrieve Image using Java 

JDBC Questions

jdbc - JDBC
= null; String url = "jdbc:mysql://localhost:3306/"; String dbName.... http://www.roseindia.net/jdbc/ Thanks 

JDBC Questions

jdbc - JDBC
Example!"); Connection con = null; String url = "jdbc:mysql://localhost...; String url = "jdbc:mysql://192.168.10.211:3306/amar"; String driver...(); } } } --------------------------------------------- Visit for more information: http://www.roseindia.net/jdbc 

JDBC Questions

error - JDBC
(); } } } i wrote any jdbc program .it won't work in my system. but it is complied i... conn = null; String url = "jdbc:oracle:thin:@localhost:1521:xe"; String...; Hi friend, Please add mysql connector jar file. Read for more 

JDBC Questions

jdbc - JDBC
("jdbc:mysql://localhost:3306/ram","root","root"); System.out.println("Connect... information. http://www.roseindia.net/jdbc/ Thanks 

JDBC Questions

mysql jdbc connectivity
mysql jdbc connectivity  i want to connect retrieve data from mysql using jdbc 

JDBC

JDBC Select Count example
JDBC Select Count example In this tutorial  we will learn how work COUNT()  in query with mysql JDBC driver. This tutorial  COUNT(*) ... = "com.mysql.jdbc.Driver"; static String url = "jdbc:mysql://localhost:3306/"; // defined 

JDBC Questions

how to connect mysql with JDBC - JDBC
in the database MYsql, i have to connect them now using JDBC, can u please suggest me... { connection = DriverManager.getConnection("jdbc:mysql://localhost...(); } } Thanks Rajanikant  Hi friend, To mysql connect using JDBC 

Java Beginners

Swings and JDBC
("com.mysql.jdbc.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost/vinay...("jdbc:mysql://localhost/vinay", "root", "admin"); if(con!=null... application using swings and mysql. I am sending part of the code here.. The problem is i 

JDBC Questions

Prepared statement JDBC MYSQL
Prepared statement JDBC MYSQL  How to create a prepared statement in JDBC using MYSQL? Actually, I am looking for an example of prepared statement.   Selecting records using prepared statement in JDBC 

JDBC

JDBC Tutorial - Writing first JDBC example and running in Eclipse
of creating project in Eclipse, downloading JDBC driver for MySQL, adding JDBC driver...; MySQL JDBC driver (to be downloaded from MySQL website) JDBC... in the video above. Step 2: Download the JDBC driver for MySQL.  You can 

Java Beginners

jdbc connectivity to mysql tutorial
jdbc connectivity to mysql tutorial  here is complete jdbc connectivity to mysql tutorial for newbies. Person who don't even know how to install mysql and don't know about which driver to use can do with ease 

JDBC Questions

Mysql & java - JDBC
; String url = "jdbc:mysql://localhost:3306/"; String dbName... on JDBC visit to : http://www.roseindia.net/jdbc/jdbc-mysql/MysqlConnect.shtml...Mysql & java  Hi guys, please help! I'm new to mysql, I want 

Maven Questions

maven mysql jdbc driver
maven mysql jdbc driver  How to add the maven mysql jdbc driver dependency in the pom.xml file of a maven based application?   Hi, Its...;groupId>mysql</groupId> <artifactId>mysql-connector-java< 

JDBC Questions

Query On JDBC - JDBC
Query On JDBC  Hello , I am trying to migrate from xls TO mysql in Linux platform.. I'm using JDBC ODBC Bridge Driver..String url = "jdbc:excel:./personal1.xls";System.out.println 

JDBC Questions

jdbc adapter exception - JDBC
jdbc adapter exception  Through JDBC, I connected to MySQL Server... = FOREIGN_KEY_CHECKS = 0" to JDBC URL( i.e., "jdbc:mysql://MyHost/myDB").Modified URL is: "jdbc:mysql://MyHost/myDB?sessionVariables = FOREIGN_KEY_CHECKS = 0 

JDBC Questions

mysql problem - JDBC
= "jdbc:mysql://localhost:3306/test"; Connection con=null; try...mysql problem  hai friends please tell me how to store the videos in mysql plese help me as soon as possible thanks in advance    

JDBC Questions

mysql tables - JDBC
"); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/databasename...mysql tables  hi, I have a table in MySql, having fields, emp_id,emp_name,emp_vertical,emp_supervisor. i need a JDBC program with driver 

JDBC Questions

mysql datasource - JDBC
mysql datasource  hello there......... i'm a real beginner for mySql can any one tell me how i do configurations in my windows machine after installing mysql(version 5.1).. i've added the Connector/J to the calss path 

JDBC Questions

MySql ClassNotFoundException - JDBC
MySql ClassNotFoundException  Dear sir, i am working in Linux platform with MySQL database , actually i finished all installation in MySQL... install in linux any software making connection between java and MySQL. Or how can i 

JDBC Questions

JAVA & MYSQL - JDBC
JAVA & MYSQL  How can we take backup of MySQL 5.0 database by using...;Hi Friend, Please visit the following page for working example of MySQL backup. This may help you in solving your problem. www.roseindia.net/mysql/mysql 

JDBC Questions

mysql andservlets - JDBC
mysql andservlets  I have two tables with primarykey fields.I need to retrive records from two tables using their primary key.What is the query in mysql?and what is the code in servlets?  Hi friend, For solving 

JDBC Questions

mysql installation problem - JDBC
mysql installation problem  Hi, when i installing mysql server on my pc in MySQL Server Instance Configuration Wizard,I enter the root pw... information. http://www.roseindia.net/mysql/mysql5/Installing-MySQL-on-Windows.shtml 

JDBC Questions

MySQL connectivity - JDBC
MySQL connectivity  hi all, i am not able to connect Mysql to java ..as i connect it ..i am getting the error ..saying classNotFoundException... to "com.mysql.jdbc.Driver" class not found In the lib folder "mysql-connector-java-5.0.6-bin.jar 

JDBC Questions

using pb datawindow activex with jdbc for mysql - JDBC
using pb datawindow activex with jdbc for mysql  Hi, I am trying to use datawindow activex in a web page. I need to connect to mysql database located on the server. I have downloaded the connectj for mysql. What should 

JDBC

Features of JDBC 4.0
productivity.  JDBC 4's key priority is to make it easier for developers to work... doesn't mean that a connection is closed. Now in JDBC 4 Connection class we... Features of JDBC 4.0       JDBC

Java Beginners

NoughtsAndCrossesGame play button doesn't work
NoughtsAndCrossesGame play button doesn't work   /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package test; import java.awt.*; import java.awt.event.*; import javax.swing. 

Java Beginners

NoughtsAndCrossesGame play button doesn't work
NoughtsAndCrossesGame play button doesn't work   /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package test; import java.awt.*; import java.awt.event.*; import javax.swing. 

General

Introduction to the JDBC
MySQL JDBC DRIVERS - 100% pure java driver for MySQL... Introduction to the JDBC Introduction This article introduce you with JDBC and shows you how to our search 

JDBC Questions

regarding jdbc - JDBC
").newInstance(); con = DriverManager.getConnection("jdbc:mysql:///test... on JDBC visit to : http://www.roseindia.net/jdbc/jdbc-mysql/MysqlConnect.shtml...("Successfully connected to MySQL server..."); } catch(Exception e 

JDBC Questions

MYSQL and SERVLETS - JDBC
MYSQL and SERVLETS  I did addition ,deletion of data in mysql using servlets .I do not know that how to combine these two programs into a single program .When I click this add menu it has to be added the data in table .when i 

JDBC Questions

Insert option does not work in my jstl... - JDBC
Insert option does not work in my jstl...  I have problem with this jstl code... This will extract and displays details from xml... But i cant able to store that values in a database... Pls solve my problem...... Joe 

Java Beginners

jdbc driver for mysql - Java Beginners
of jdbc-mysql database connectivity and idea about jdbc and mysql driver...jdbc driver for mysql  I need jdbc driver program for connecting java progrma to mysql. Please any one send me the url to download the driver 

JDBC Questions

mysql problem - JDBC
mysql problem   hai friends i have some problem with image storing in mysql. i.e while i am using image(blob) for insert the image it says... of creation of table in mysql. it will take any image and store in database 

JDBC Questions

not able to connect to mysql using.. jdbc
not able to connect to mysql using.. jdbc   i am not able to connect to mysql using jdbc .. is there any classpath that i need to set..because i am using mysql-connector-java jar file..to connect to mysql.. Pls provide the steps 

JDBC Questions

regarding java - JDBC
done front end work using swing and AWT concepts of java i am using mysql as back end and i have also configured java with mysql i am using three table in mysql supplier table producer table customer table problem is that how i 

Programming Tutorials

batch in jdbc
JDBC BATCH PROCESSING    In Batch processing, many queries work together as batch. The following program include collective set of SQL queries...;url = "jdbc:mysql://192.168.10.13:3306/";      

JDBC Questions

jdbc question - JDBC
(),"jdbc:mysql://localhost/commons",pros); KeyedObjectPoolFactory kopf =new...jdbc question   Up to now i am using just connection object for jdbc... a database connection for each user. In JDBC connection pool, a pool of Connection 

JDBC Questions

jdbc question - JDBC
(),"jdbc:mysql://localhost/commons",pros); KeyedObjectPoolFactory kopf =new...jdbc question   Up to now i am using just connection object for jdbc... a database connection for each user. In JDBC connection pool, a pool of Connection 

JDBC Questions

SERVLETS AND MYSQL - JDBC
 

JDBC Questions

Retrieving cells in MySQL - JDBC
 

JDBC Questions

JDBC in JSP - JDBC
JDBC in JSP  Sir, I got a problem in my jsp page which contains a delete query to delete the fields from MySql DB. The delete query is working successfully when we insert the values manuely to the table. When we insert values 

JDBC Questions

regarding jdbc - JDBC
= DriverManager.getConnection("jdbc:mysql://localhost:3306/yourdatabase", "your username", "your...regarding jdbc  how to connect mysql with java example you have provided is having some error and i am not able to remove that error please 

JDBC Questions

jdbc mysqll - JDBC
("com.mysql.jdbc.Driver"); Connection con=DriverManager.getConnection("jdbc:mysql..."; String url = "jdbc:mysql://192.168.10.211:3306/"; String dbName = "amar...jdbc mysqll  import java.sql.*; public class AllTableName{ public 

JDBC Questions

JAVA(JDBC) - JDBC
"; String driverName = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql...JAVA(JDBC)  Hello friends, please tel me, how can we retrieve... for more information. http://www.roseindia.net/jdbc/save_image.shtml 

Java Beginners

jdbc
jdbc  Hai , Give a steps for jdbc connectivity 

Java Beginners

jdbc
jdbc  display the records using index in jdbc 

JDBC Questions

JDBC
JDBC  why we use batch in jdbc 

JDBC Questions

Jdbc Question
Jdbc Question  Hi. In Jdbc, if i am pointing to the database of some other machine, i mean instead of local-host i give the ip of that machine and that machine is shut down, Will my connection still work 

JDBC Questions

Help on JSP and JDBC - JDBC
;% Connection con = null; String url = "jdbc:mysql://localhost:3306/"...Help on JSP and JDBC  Retrieve data from Database in JSP and JDBC connection.  retrivedata.jsp<%@ page language="java" import 

JDBC Questions

timestamp - JDBC
timestamp   Is there any timestamp for INSERT, UPDATE commands? If is there, when it will get effected?  Hi friend, http://www.roseindia.net/jdbc/jdbc-mysql/SetTimetamp.shtml Thanks 

JDBC Questions

JDBC
JDBC  How to add set of queries in a single query in JDBC 

Java Server Faces

Working with Database through JDBC
Working with Database through JDBC          You can use JDBC to work with database. For this you can write JDBC code in the action method 

JDBC Questions

Connecting to remote mysql server using jdbc.
Connecting to remote mysql server using jdbc.  How to Connect to remote mysql server using jdbc 

JDBC Questions

java - JDBC
java  how to get connectoin to database server from mysql through java programme  Hi Friend, Please visit the following link for more detailed information http://www.roseindia.net/jdbc/jdbc-mysql 

JDBC Questions

JDBC connection
JDBC connection  ![alt text][1]I got exception in Connecting to a MySQL Database in Java. The exception is ClassNotFoundException:com.mysql.jdbc.Driver wat is the problem 

JDBC Questions

java - JDBC
for database connectivity: http://www.roseindia.net/jdbc/jdbc-mysql... have to use JDBC and oracle. plz send the details for connecting "java... sending data inserting code into database using JDBC with jsp 

JDBC Questions

Server DB connection - JDBC
also tried passing the 4th argument to the mysql_connect function but I can't get it to work. If you have any sample code for getting connection please 

JDBC Questions

JDBC
JDBC  can u send me the code of jdbc how to join two tables that are in relation 

Java Beginners

Jdbc
Jdbc  A java program with jdbc connectivity with insert,delete,update options for name,regno,mark1,mark2,total 

Java Beginners

jdbc
jdbc  is it possible to use doget & dopost method with jdbc to call in a servlet programe 

Development process Questions

JDBC
JDBC  in class.forname which driver name we are writing for the connection from jdbc to sqlserver 2008 

Java Beginners

JDBC
JDBC  how to set classpath for eclipse, java, where to copy jdbc connector 

JDBC Questions

jdbc
jdbc  why do we need to load jdbc drivers before connecting to database 

Java Beginners

jdbc
jdbc   how to write program to save data and retrieve data from the form in Java 

JDBC Questions

jdbc
jdbc  please tell me sir.i dont know JDBC connection and how to create table in database 

JDBC Questions

jdbc
jdbc define batch updates  define batch updates?exp   JDBC... links: http://www.roseindia.net/jdbc/Jdbc-batch-update.shtml http://www.roseindia.net/tutorial/java/jdbc/batchupdateresultsetexample.html 

JDBC Questions

JDBC, JAVA
JDBC, JAVA  I want to develop a s/w that will work on a LAN, so is there any need for a server, bcoz I am using database to store information, and these information will be on LAN 

JDBC Questions

jdbc
jdbc  Write a web based student registration application where the students can register online with their enrollment no. You are required to use JSP, Servelet and JDBC 

JDBC Questions

JDBC CONNECTIVITY
file in environment variable.   Java Mysql connectivity Other JDBC...JDBC CONNECTIVITY  How do i connect my database to java. I have the connector file and i place it in lib of jdk folder and installed the jdbc driver 

JDBC Questions

jdbc in linux
jdbc in linux  what will be database url if i'm using mysql database on linux platform ? what will be driver name & class name to be used in "Class.forName()" method ? plz give short source code 

JDBC Questions

Java jdbc class.forName error - JDBC
Java jdbc class.forName error  HI: how is possible that my JDBC connection to an MYSQL instance works inside the IDE (Netbeans) and not when I start it from the jar file? Could some please give some pointers please? Higly 

JDBC-Tutorials

JDBC Training, Learn JDBC yourself
with MySQL JDBC MySQL Tutorial JDBC Tutorials with MySQL Database... JDBC Connectivity Code in Java.   JDBC Drive For Mysql... JDBC Drive for Mysql.   JDBC Execute Query 

JDBC Questions

jdbc
how can we set transaction level through jdbc api  how can we set transaction level through jdbc api   Use Connection.setTransactionIsolation(int) to set the desired tansaction level, which takes one of the 5 arguments 

Advertisements Advertisements
 

 

 

DMCA.com