I am using MS-Access as back end for an application that I am developing using java.I have a HTML form which consists of two input boxes.I want to take the values typed in input boxes and add them to the table.I tried using Insert statement but it is not working.I think there is some problem with the code.Though the insert statement is working in MS-Access query but it is not working when I am trying to insert values into the table from the java code.Can anyone please help me? Thanks.
hi abdul your query doesnt explain where in your code you are actually going wrong ....... anyway try doing all of the following 1> Register a driver using the Class.forName("driver") statement this drive should be compatible for use with the database you are using; 2> Create a connection to the database using DriverManager.getConnection(); 3> Create an sql statements using the Connection.CreateStatement() method 4> use the executeUpdate() method on the statement to fire the insert statement...... this should work luck pranav
hi, i got the same error too. i have got perfect connection with msaccess and my java code queries well, infact it do all the reading stuff from the database very well. the problem arise only when i try to write somethign to the database, either thru INSERT or CREATE, the error msg it gives is suitable driver not found n then it dont connect to the database, but its compiled without any errors. only give runtime errors. someone suggested to me not to use msaccess for these kinda purposes. so i am gonna try SQL SERVER and advise u to do the same too , adios
Joined: Oct 11, 2000
Hi Rajesh, My code is neither showing any error nor throwing any exceptions.Here is the code.
Please help me.Also Im using servlets. Added UBB CODE tags to preserve indentation [This message has been edited by Frank Carver (edited October 25, 2000).]