First make sure that you have the table created:
stmt.executeUpdate("CREATE TABLE AAA (column types)");
Then you can add to the table:
stmt.executeUpdate("INSERT INTO AAA VALUES (values)");
If you need help creating a table with the different fields and etc, I
highly recommend the JDBC API Tutorial and Reference, 2nd Ed. from the Java
Series by Sun. Definitely worth the $40. It has everything you need to
know to use JDBC java with standard databases.
MP
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's JavaServlet API
Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of V T R Ravi
Kumar
Sent: Wednesday, October 04, 2000 10:48 PM
To: [EMAIL PROTECTED]
Subject:
I have a problem...
I have a database say x.mdb in access and I have written a servlet to get
a table yyy from the database and show it on a html page. The usere sees
the data and has to return his choice which is tobe stored in another
table named say zzz .
I order to retreive i had used the following syntax
==
Statement stat=dbConn.createstatement();
Resultset dfas=stat.executeQuery("SELECT .... FROM"+"yyy");
....
while(dfas.next())
{
dfas.getString(.......
......
......
}
==
Inorder to insert something into the same database but another table zzz
What Should i do
--
V.T.R..
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For Every Problem, there is a solution, which is simple, neat and wrong !
- H.L.Menchen
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html