Servlet program for updating database martin dating
*/ */ public class Actor // Servlet package servlet; /* * To change this template, choose Tools | Templates * and open the template in the editor.
*/ import *; import *; import javax.servlet.*; import javax.*; import dbconn.dbconn; import apps Class.
Creation of dsn(database source name) Start-Control panel- Administrative Tools- Data Sources (ODBC)-go to system dsn tab-click add button-select a driver for which you want to set up data source (for Oracle- Oracle in XE)-select it and click finish-give any name in data source name textbox-then click ok button.
package apps Class; import *; /* * To change this template, choose Tools | Templates * and open the template in the editor.
To support these techniques in database applications, PL/SQL provides the datatypes TABLE and VARRAY, which allow you to declare index-by tables, nested tables and variable-size arrays.
In this chapter, you learn how those types let you reference and manipulate collections of data as whole objects.
It can also be VARCHAR2 or one of its subtypes VARCHAR, STRING, or LONG.
You must specify the length of a VARCHAR2-based key, except for LONG which is equivalent to declaring a key type of VARCHAR2 (32760).
These need to be replaced with something that is able to run it multiple times so "while" loop would be correct choice.
Session declaration and forwarding should be outside of this set of brackets because you want to collect all data, you MUST close database connection and only after this continue with rest of data processing such as session set up and redirecting/forwarding Have look at this post it should be beneficial to what you doing.
In that example My SQL is used, but is minor detail as that can be easily changed.
Nevertheless I'm happy to see you using servlets for your project. That would make sense because there is multiple rows.. I tried reading the tutorial but still couldnt get mine working.. as your Actor object initialized with Result Set as argument and later on you overwrite your variables again.
Therefore Actor should be declared as collection Vector or much better Array List (easy to iterate through) - - It will be helpful if anyone can put sample code with bits of explanation.
Even if you do put while in action there is issue of data collection.