i am using varrays for storing records.we are using java to make grid.we using plsql as back end.we defined varrays for storing records.when executed query select element from database to varrays.then storing new records in to the same varrays.for example we pressed delete button java will delete the row from grid.i have to delete the specific record from my varray.is that possible? and also i want to know something more.this is what i want.example.my grid fields are empno,names.i made 3 varrays to store records.when i executed query it selected(retrieved) 4 records from database.it will stored in emp(variable of emparray),nam(variable of namearray),rd(variable of rowidarray) respectively.then i made a new record it will stored in emp(5) and nam(5) respectively.when i press the update button i have to insert or update those data.i mean when i changed the value of emp(3) i have to update that row and if i inserted a new record i have to insert that record into database.what query should i use to do this procedure.
this is what i used.
begin
for i in 1..emp.count loop
update table_name set empno=emp(i),names=nam(I) where rowid=rd(i);
end loop;
end;
begin
for i in rd.count(this variable using for storing rowids)..emp.count loop
insert into table_name(empno,name) values(emp(i),nam(i);
end loop;
end;
it is working.but i feels that this query is a nonstandard and less reliable.anybody can help me?