Ondelete cascade
Hai,
Im using ondelete cascade constraint in my table.... but now im in a scenario where i want to delete the records from the parent table but the child record should not be deleted (Even though i have ondelete cascade).
Is there any way to achieve... if u have any idea on this please suggest me , bcoz this is bit urgent for me....
Anoo
Hello,
For issues regarding ODP.NET managed driver, I would suggest you posting to oracle entity framework forum:
https://community.oracle.com/communications
There are oracle entity framework expects who will help you better.
Thanks for your understanding.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
Delete a row in a table should affect in another table specified row
hello ,
my problem is let us assume i have two table related to each other as
dish [d_id as primary key ,d_name,d_code,d_cost]
dish_outlet [id as primary key,d_id as foreign key,outlet_name,amt]
i set foreign constraint in dish_outlet as foreign basetable as [dish_outlet] , foreign key as [d_id] , primary key table as [dish],primary key as [d_id].
now i want to do as delete a row where d_id is let us suppose '1' in dish table but also dish_outlet whose d_id will be '1' should also get deletd
my issue is on [DELETE FROM dish WHERE d_id ='1'] query a row is deleted from dish table only.
give a opinion or solution to my problem i need a query for vb.net and if foreign key setting is mistaken then need a procedure to solve it.
im using vb.net with sqlserver 2005 with sqlserver management studio
azizuse ondelete cascade option
Please see below example for your reference
CREATE TABLE dbo.cource
courceID INT PRIMARY KEY,
Name VARCHAR(50)
CREATE TABLE dbo.student
studentID INT PRIMARY KEY,
name VARCHAR(50),
courceID INT REFERENCES cource(courceID)
ON DELETE SET NULL
ON UPDATE CASCADE,
Duration TIME(0)
INSERT INTO dbo.cource(courceID , Name)
VALUES (1,'c1'), (4,'c2')
INSERT INTO dbo.student (studentID,name, courceID, Duration)
VALUES (1, 's1' , 1, '00:07:08'),
(2, 's2', 1, '00:07:52'),
(3, 's3', 1, '00:07:56'),
(4, 's4', 4, '00:05:12')
DELETE FROM dbo.cource
WHERE courceID = 1
SELECT A.courceid, A.Name,
T.studentID, T.name, T.courceID, T.Duration
FROM dbo.cource A
RIGHT JOIN dbo.student T ON A.courceid = T.courceID
-
Insertion of Record using GRID
Hello Sir,
This is Debasish here.Using Flex Grid I want to insert a
record in backend resource i.e. database.So how I can create a
blank editable row in flex grid.
Please provide me support.hi
When you're workin with Master-Detail make sure that you're selecting right controls from the "Data Control Palette". Drop the Constructors from "data control palette" on your JSF JSP Form. Then use the persistEntity method drop it on the same form and a dialog box wil open, in this select the value as that collection's RESULT,
For the detail table drop the detail table constructor on the form and also the dropdown list box on the primary key of the master table and then use persistEntity.
for furthur reference on CREATING I/P FORMS USING CONSTRUCTORS REFER.. jdeveloper documentation section 10.7.1
When you're working with Master-Detail make sure your detail table is properly linked using Foreign Key. and in the create table template make sure you choose onDelete CASCADE option. This will help you to delete all child records automatically when the master record is deleted.
BEST OF LUCK
Ravi Trivedi
Message was edited by:
Trivedi
Message was edited by:
Trivedi -
We are developing with Visual Studio 2013, Entity Framework 5, Oracle DB 11 via ODP.NET managed driver.
The edmx is generated/updated from database (database first). We generate POCO object using standard T4.
We have 2 tables with a master-detail foreign key relation, one to many. The foreign key in database does _not_ allow cascade deletes, so when you delete master row via SQL, you get error " ... child record found ... ".
The problem now is:
In Entity Framework, when i delete a record from the master table, then EF also deletes all corresponding detail records from the detail table! The restriction of the foreign key in database is ignored.
In edmx diagram, the properies End1 OnDelete / End2 OnDelete are set to "None", so i expect that on delete of a master row, EF should throw an error if detail rows exists.
How can i disable the cascading of the delete?
Here is the FK definition in edmx:
<Association Name="USR_USER_ROLES_ROLES_FK">
<End Role="USR_ROLES" Type="Self.USR_ROLES" Multiplicity="1" />
<End Role="USR_USER_ROLES" Type="Self.USR_USER_ROLES" Multiplicity="*" />
<ReferentialConstraint>
<Principal Role="USR_ROLES">
<PropertyRef Name="GES" />
<PropertyRef Name="PROJ" />
<PropertyRef Name="ROLE_NAME" />
</Principal>
<Dependent Role="USR_USER_ROLES">
<PropertyRef Name="GES" />
<PropertyRef Name="PROJ" />
<PropertyRef Name="ROLE_NAME" />
</Dependent>
</ReferentialConstraint>
</Association>
The delete of master row is done by calling:
ivDbCtx.USR_Roles.Local.Remove(role); // ivDbCtx is the DbContext, USR_Roles is the collection, role is the POCO object to be deleted.
Thank you very much for your help!
UdoHello,
For issues regarding ODP.NET managed driver, I would suggest you posting to oracle entity framework forum:
https://community.oracle.com/communications
There are oracle entity framework expects who will help you better.
Thanks for your understanding.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Get('XML') doesn't work, but get() does in javascript - CASCADING LOVs
I'm trying to get cascading LOVs working in Apex 3.1.0 in Oracle 11g. When I call get.get('XML') it returns null in firefox and empty string in IE6. If I change it to call get.get() then it returns the XML as a string into Javascript.
The Application process is getting called in both scenarios as i've put PL/SQL logging to disk in order to prove it. The XML being returned is very basic so i'm sure it's not a problem with formatting. I'm not getting any exceptions thrown in javascript either.
Is it possible to use get.get() and then convert the text into an XML object which is returned as per get.get('XML') which at least will allow me to get something working ?
thanks
<script language="JavaScript" type="text/javascript">
function getBusinessFieldJS(pThis, pSelect)
alert('getBusinessFieldJS');
try
var l_Return = null;
var l_Select = html_GetElement(pSelect);
var get = new htmldb_Get(null, html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=GET_DATA_FIELDS_XML', 0);
/*get.add('F120_GETBUSINESSFIELD_ITEM',pThis.value);*/
gReturn = get.get('XML');
alert('gReturn=' + gReturn);
alert('gReturn.value=' + gReturn.value);
if (gReturn == null)
alert('gReturn is null');
if(gReturn && l_Select)
var l_Count = gReturn.getElementsByTagName("option").length;
alert('l_count='+l_Count);
l_Select.length = 0;
for(var i=0;i<l_Count;i++)
var l_Opt_Xml = gReturn.getElementsByTagName("option")+;+
+ appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),+
+ l_Opt_Xml.firstChild.nodeValue)+
+ }+
+ }+
+
get = null;+
+ }+
+ catch (e)+
+ {+
+ alert('Exception : ' + e);+
+
}+
+}+Hi,
I've been trying to replicate your problem here: [http://apex.oracle.com/pls/otn/f?p=37055:1]
My application process is:
BEGIN
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p('Cache-Control: no-cache');
HTP.p('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn('<select>');
HTP.prn('<option value="-1">Please Select</option>');
HTP.prn('</select>');
END;(Just copied from your post and XML changed to xml, otherwise untouched)
And my page has a simple HTML region with the source of:
<div id="XMLOUTPUT" style="border:1px solid blue; width:200px; height:200px;"></div>
<div id="XMLOUTPUT2" style="border:1px solid blue; width:200px; height:200px;"></div>
<script type="text/javascript">
function getMyXML()
var l_Return = null;
var get = new htmldb_Get(null, html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=RETURN_XML', 0);
gReturn = get.get('XML');
var d = html_GetElement('XMLOUTPUT');
d.innerHTML = gReturn;
var d2 = html_GetElement('XMLOUTPUT2');
d2.innerHTML = get.get();
var s = gReturn.getElementsByTagName("select");
alert(s.length);
</script>
<a href="javascript:getMyXML();">Click</a>Click on Click at the bottom of the page. The first DIV gets the get.get('XML') object and the second one the get.get() and a popup message tells you how many "select" items are in the XML version.
As far as I can see, this works fine.
Andy -
How do I delete cascade with a PL/SQL procedure?
This script will create a PL/SQL procedure that deletes cascade. This is a post to contribute to the Oracle community. Take the code as is and test it before you use it in production. Make sure this is what you want.
Procedure Delete Cascade (prc_delete_cascade)
Description
=============
The principle is very simple. The procedure uses a table called TO_BE_DELETED to keep a list of records to be deleted. This
table keeps the table name and the rowid of those records that need to be deleted. The procedure also uses a function called
DELETE_BOTT_ROW which takes one record of the table and tries to delete it. If the deletion fails with a foreign key constraint
violation, the function parses the SQL error message (SQLERRM) to get the name of the constraint. With the name of the constraint,
the function finds the name of the child table, all the child records that have references to the parent table primary or unique key,
and the parent key primary or unique key column name. Once the child records of the failed delete are identified, the function takes their table name and rowids
and records them into the TO_BE_DELETED table by inserting records of their table name and their rowids. Al the records inserted also contain the level (which
is 1 for the original records, 2 for child records, 3 for granchild records, etc.) and the sequence number of the order in wich they
are recorded. This way, when the function picks up a record to be deleted, it takes the one with the highest level and the highest
inserted sequence, or the "bottom" record. Once all the child records of the failed delete are appended to the TO_BE_DELETED table, it calls itself
recursevely, and the function takes the record at the "bottom" of the table and tries to delete it. If it succeeds, it calls
itself recursevely to delete the next record. If it fails, it goes and finds the child records as described before and once they are
inserted into the TO_BE_DELETED table, it calls itself again recursevely to try to delete again the "bottom" record. All records
that are successfully deleted are flagged as deleted usig the flag_del column so they are not pickt up again. Once all the (parent,
child, grandchild, etc.) records are deleted, the procedure ends without commiting, giving the option to the user to commit or
rollback deletions. The table TO_BE_DELETED is, at the end of the procedure, a list of all the records that were deleted, including their table names
and the order in with they were deleted. The user then can review its content and decide to commit or rollback.
Restrictions
============
1. Single tables only. The procedure only takes one table name and a WHERE clause to identified the records to be deleted.
2. Single columns only. Ther procedure only works with single-column primary, unique and foreign key constraints.
3. Single schema only.
4. Unpredictable results with circular references.
drop table to_be_deleted purge;
create table to_be_deleted
(tname varchar2(30) -- table name
,rid rowid -- rowid
,lvl number -- level: 1=parent, 2=child, 3=grandchild, etc.
,seq_ins number -- sequence order of record inserted
,flg_del char -- flag deleted: Y=record deleted
,seq_del number -- global order of record deletion
set serveroutput on size 1000000
create or replace procedure prc_delete_cascade
(p_tname varchar2 -- table name
,p_where varchar2 -- where clause identifying records to be cascade deleted
is
dummy char;
v_sqlcode number;
v_sqlerrm varchar2(32767);
v_param_val integer := 0;
v_sql varchar2(4000);
v_ret_cde number;
e_bad_params exception;
v_iter number;
v_plvl number;
v_seq_del number;
v_max_iter number := 1000000000;
function delete_bott_row
return number
is
v_sql varchar2(4000);
v_ptname varchar2(30); -- parent table name
v_ppkname varchar2(30); -- parent primary key constraint name
v_ppkcname varchar2(30); -- parnet primary key column name
v_prowid rowid;
v_crowid rowid;
v_ctname varchar2(30); -- child table name
v_cfkname varchar2(30); -- child foreign key constraint name
v_cfkcname varchar2(30); -- child foreign key column name
v_ins number;
v_seq_ins number;
v_sqlerrm varchar2(4000);
v_sqlcode number;
e_const_viol exception;
pragma exception_init(e_const_viol, -2292);
e_max_iter_reached exception;
begin
v_iter := v_iter + 1;
if v_iter >= v_max_iter then
raise e_max_iter_reached;
end if;
dbms_output.put_line('- Iter '||to_char(v_iter));
dbms_output.put_line('----------');
dbms_output.put_line('- Starting function delete_bott_row');
v_sql := 'select tname, rid, lvl, seq_ins from (select * from to_be_deleted where flg_del = ''N'' order by lvl desc, seq_ins desc) where rownum=1';
-- dbms_output.put_line('- SQL: '||v_sql);
execute immediate v_sql into v_ptname, v_prowid, v_plvl, v_seq_ins;
dbms_output.put_line('- Selected row: table name: '||v_ptname||', level: '||v_plvl||', seq: '||v_seq_ins);
v_sql := 'delete from '||v_ptname||' where rowid='''||v_prowid||'''';
dbms_output.put_line('- SQL: '||v_sql);
execute immediate v_sql;
dbms_output.put_line('- Row deleted !!!');
v_ret_cde := 1;
v_seq_del := v_seq_del + 1;
dbms_output.put_line('- Mark the row deleted');
v_sql := 'update to_be_deleted set flg_del = ''Y'', seq_del = '||to_char(v_seq_del)||' where tname='''||v_ptname||''' and rid='''||v_prowid||'''';
-- dbms_output.put_line('- SQL: '||v_sql);
execute immediate v_sql;
-- dbms_output.put_line('- Updated table to_be_deleted, row marked deleted');
-- dbms_output.put_line('- End of iter '||to_char(v_iter));
dbms_output.put_line('----------');
-- call function delete_bott_row recursively
v_ret_cde := delete_bott_row;
return 0;
exception
when no_data_found then
dbms_output.put_line('- Table to_be_deleted is empty, delete cascade has completed successfully.');
v_ret_cde := 0;
return 0;
when e_const_viol then
v_sqlcode := SQLCODE;
v_sqlerrm := SQLERRM;
v_ret_cde := v_sqlcode;
dbms_output.put_line('>Constraint Violation. Record has children');
-- dbms_output.put_line('Error code: '||to_char(v_sqlcode));
v_cfkname := substr(v_sqlerrm,instr(v_sqlerrm,'.')+1,instr(v_sqlerrm,')') - instr(v_sqlerrm,'.')-1);
dbms_output.put_line('>Child FK name: '||v_cfkname);
select table_name, column_name
into v_ctname, v_cfkcname
from user_cons_columns
where constraint_name=v_cfkname;
dbms_output.put_line('>Child table name: '||v_ctname||'. FK column name: '|| v_cfkcname);
select constraint_name, column_name
into v_ppkname, v_ppkcname
from user_cons_columns
where constraint_name = (select r_constraint_name
from user_constraints
where constraint_name=v_cfkname);
dbms_output.put_line('>Parent PK/UK name: '||v_ppkname||'. Parent PK/UK column: '||v_ppkcname);
v_sql := 'insert into to_be_deleted(tname, rid, lvl, seq_ins, flg_del) '||
'select '''||v_ctname||''', rowid, '||to_char(v_plvl+1)||', rownum, ''N'' '||
'from '||v_ctname||' '||
'where '||v_cfkcname||' =any (select '||v_ppkcname||' from '||v_ptname||' where rowid =any (select rid from to_be_deleted where tname = '''||v_ptname||'''))';
-- dbms_output.put_line('- SQL: '||v_sql);
execute immediate v_sql;
select count(*)
into v_ins
from to_be_deleted
where lvl = v_plvl+1
and tname = v_ctname
and flg_del = 'N';
dbms_output.put_line('>Found '||to_char(v_ins)||' child records which were added to table to_be_deleted');
v_ret_cde := delete_bott_row;
return v_ret_cde;
when e_max_iter_reached then
dbms_output.put_line('Maximum iterations reached. Terminating procedure.');
raise;
when others then
raise;
end delete_bott_row;
begin
dbms_output.put_line('Beginning');
dbms_output.put_line('================================');
-- validate p_table
begin
select 'Y'
into dummy
from user_tables
where table_name=upper(p_tname);
exception
when no_data_found then
v_param_val := 1;
dbms_output.put_line('Table '||p_tname||' does not exist.');
raise e_bad_params;
end;
dbms_output.put_line('- Parameter p_tname validated');
-- validate p_where
begin
execute immediate 'select ''Y'' from '||p_tname||' where '||p_where INTO dummy;
exception
when no_data_found then -- where clause returns no records
dbms_output.put_line('Record(s) not found. Check your where clause parameter');
v_param_val := 2;
raise e_bad_params;
when too_many_rows then -- found multiple records means it is ok
null;
when others then -- any other records means where clause has something wrong.
dbms_output.put_line('Where clause is malformed');
v_param_val := 2;
raise e_bad_params;
end;
dbms_output.put_line('- Parameter p_where validated');
if v_param_val > 0 then raise e_bad_params; end if;
v_iter := 0;
v_plvl := 1;
v_seq_del := 0;
v_sql := 'insert into to_be_deleted(tname, rid, lvl, seq_ins, flg_del) select '''||upper(p_tname)||''', rowid, '||to_char(v_plvl)||', rownum, ''N'' from '||p_tname||' where '||p_where;
dbms_output.put_line('- Inserting initial record');
dbms_output.put_line('- SQL: '||v_sql);
execute immediate v_sql;
dbms_output.put_line('- Record(s) inserted');
dbms_output.put_line('- Calling function delete_bott_row to delete last row of table to_be_deleted');
dbms_output.put_line('-----------------------------------');
v_ret_cde := delete_bott_row;
-- dbms_output.put_line('- Back from function delete_bott_row');
-- dbms_output.put_line('Return code: '||to_char(v_ret_cde));
dbms_output.put_line('- End of procedure');
exception
when e_bad_params then
dbms_output.put_line('Bad parameters, exiting.');
end;
show errors
spool prc_delete_cascade.log
-- Call to the procedure
exec prc_delete_cascade('xent','xent_id between 1669 and 1670')
select tname "Table Name", count(*) "Rows deleted"
from to_be_deleted
group by tname;
spool off
set lines 120
select *
from to_be_deleted
order by seq_del;
prompt Now commit or rollaback deletions.
-- commit;
-- rollback;Edited by: Rodolfo4 on Mar 23, 2011 10:45 AMInteresting.
I see a few areas where this could be useful. Elimiating specific test records from a Test DB for example.
Some comments:
<li>Since this is a recursive logic you must add a stop criteria. In this case I would add a max iteration variable. If that one is reached, raise an error message and let the procedure stop with that error.</li>
<li>The when others exception at the end should be removed completely</li>
<li>The when others exception in the middle should be replaced by a specific exception that handles the -2292 error</li>
<li>A list of tables where no record should be deleted could be usefull. If the logic would encounter such a table, it should also stop. This would be to prevent that data from some system critical tables could be deleted per accident.</li>
<li>The reference from the FK constraint to the PK constraint should include the table name and if possible the owner (as long as you use user_* views the owner is always the same. But we could extend this to the ALL_* views). I never met a system where different tables have the identical FK constraint names, however just make this fool proof.</li> -
Issue in EHP5 Talent Management (Team Goals) Cascade goals functionality
Hi Friends,
Issue in EHP5 Talent Management (Team Goals) Cascade goals functionality.
Under Team Object While try to cascade goals, it pop-Up Warning Msg u201CChoose Save to save the goal in the employee document. The goal can no longer be deleted, only set to obsoleteu201D.
If we click Ok to proceed further, I am getting error stating u201CYou have made no selection" and " No appraisal template defined ".
Same functionality is working fine in u201CPerformance Management (Predefined)u201D
With Regards
Seranjeeve KumarPlease set the parameter PROCESS "PMP" in the iview configuration.
ie
ROLE_ID=PA&PROCESS=PMP in application parameters
content provided by SAP ->
specialist ->
Talent management Specialist ->
iViews ->
COmpany goals etc
and you can confirm using this
CL_HAP_CASCADE_GOALS > meth0d GET_VALID_APPRAISAL_TEMPLATES
The parameter mentioned in the note 1457057, the one that you enter in
transaction SE80 is the default value. However, if you call application
with parameter PROCESS=PMP then the PMP process for cascading goals will
be used.
check note 1523527 -
Hello Everyone
I have two drop downs. Both are coming from look up fields from two lists. i want to set a default value(first list item) for the first drop down list box and then apply cascading based on the default value for the next drop down list box. I found one article(http://www.bizsupportonline.net/infopath2010/display-first-item-drop-down-list-box-infopath-2010.htm)
where in i can set a default value but i can't apply cascading based on that default value. Any suggestions would be highly appreciated.
Thanks
Ramanjulu Naidu NHey Ramanjulu,
Take a look at the below article which I believe will answer your question.
http://basquang.wordpress.com/2010/03/29/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010/
Daniel Christian (MCTS) -
Weblogic 9.1, EJB 2.0, Oracle 9i: Cascade delete Error
Hi All,
I am facing an error with the cascade-delete facility in ejb2.0 with weblogic 9.1
Assume that I have the following relation:
<ejb-relation>
<ejb-relation-name>TeacherEJB-StudentEJB</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>teacher-has-student
</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>TeacherEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>teacher</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>student-has-teacher
</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<cascade-delete/>
<relationship-role-source>
<ejb-name>StudentEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>student</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type><cmr-field>
</ejb-relationship-role>
</ejb-relation>
Now when I have to delete one record from the DBSTUDENT table, what i do is the following:
StudentHomeLocal.remove(studentModel.getStudentId());
The above statement throws an SQLException staying it can't update TeacherID in DBSTUDENT (PK of DBTEACHER, FK in DBSTUDENT) with NULL.
The same code is working perfectly well in Weblogic 8.
I even tried deleting the local directly by the following statement:
StudentLocal.remove();
But this too doesn't work.
I also tried by removing the <cascade-delete/> attribute from the ejb-jar.xml file and updating the 'on-delete cascade' option in the database, but this too did not work.
There is another option of <db-cascade-delete> in weblogic-cmp-rdbms-jar.xml that I tried but this too did not work.
In short, I have tried the following cases but to no avail:
1. Mention cascade delete in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar and in the database.
2. Mention nothing in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar but 'on cascade delete' mentioned in the database.
3. Mention cascade delete in ejb-jar.xml and db-cascade-delete mentioned in weblogic-cmp-rdbms-jar.xml.jar and 'on cascade delete' in the database.
4. Remove all cascade delete from the ejb-jar.xml,the weblogic-cmp-rdbms-jar.xml and from the database.
Neither of the above work.
Kindly help ASAP.
Thanks in advance,
Sachidanand.Hi All,
I am facing an error with the cascade-delete facility in ejb2.0 with weblogic 9.1
Assume that I have the following relation:
<ejb-relation>
<ejb-relation-name>TeacherEJB-StudentEJB</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>teacher-has-student
</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>TeacherEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>teacher</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>student-has-teacher
</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<cascade-delete/>
<relationship-role-source>
<ejb-name>StudentEJB</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>student</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type><cmr-field>
</ejb-relationship-role>
</ejb-relation>
Now when I have to delete one record from the DBSTUDENT table, what i do is the following:
StudentHomeLocal.remove(studentModel.getStudentId());
The above statement throws an SQLException staying it can't update TeacherID in DBSTUDENT (PK of DBTEACHER, FK in DBSTUDENT) with NULL.
The same code is working perfectly well in Weblogic 8.
I even tried deleting the local directly by the following statement:
StudentLocal.remove();
But this too doesn't work.
I also tried by removing the <cascade-delete/> attribute from the ejb-jar.xml file and updating the 'on-delete cascade' option in the database, but this too did not work.
There is another option of <db-cascade-delete> in weblogic-cmp-rdbms-jar.xml that I tried but this too did not work.
In short, I have tried the following cases but to no avail:
1. Mention cascade delete in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar and in the database.
2. Mention nothing in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar but 'on cascade delete' mentioned in the database.
3. Mention cascade delete in ejb-jar.xml and db-cascade-delete mentioned in weblogic-cmp-rdbms-jar.xml.jar and 'on cascade delete' in the database.
4. Remove all cascade delete from the ejb-jar.xml,the weblogic-cmp-rdbms-jar.xml and from the database.
Neither of the above work.
Kindly help ASAP.
Thanks in advance,
Sachidanand. -
Problem with "Row-specific or Cascading Lists in Table Layout"
Hello, friends!
I have read article "Row-specific or Cascading Lists in Table Layout" written by Steven Davelaar. I have maked several table layouts with this technique and it worked fine.
But now I have one problem, and this problem is very strange. One of VOs for which I use this table layouts throw exception after commit changes on first LOV attribute (Deptno). First time it was error
(oracle.jbo.ReadOnlyAttrException) JBO-27008: for atribute mgrList
at oracle.jbo.AttrValException.<init>(AttrValException.java:112)
at oracle.jbo.ReadOnlyAttrException.<init>(ReadOnlyAttrException.java:40)
at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:815)
at oracle.jbo.jbotester.JboTesterUtil.setData(JboTesterUtil.java:173)
Then I setted updateable property of MgrList attribute to always and now i have this error:
oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:java.util.List with value:[{}]
at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:721)
at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:85)
I don't know why, but all worked fine yestarday. And same code works fine for another VOs. And article Test application works fine too.
Help me, please.
Thank you.<table id="OsnovaniyaPrikazEnd" model="${jhsTableBindings.OsnovaniyaPrikazEnd_1B}" detailDisclosure="${uix.eventResult.detailData}" partialRenderMode="multiple" partialTargets="messageBox _uixState " proxied="true" alternateText="${nls.NO_ROWS_FOUND}" width="50%" rendered="${bindings.newGroup_end2Iterator.findMode!='true'}">
<tableFormat tableBanding="rowBanding"/>
<contents>
<formValue value="${uix.current.rowKeyStr}" name="rowKeyStr" id="${ui:concat('OsnovaniyaPrikazEnd:rowKeyStr:',uix.current.tableIndex)}"/>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'Id')}" text="Id" required="yes"/>
</columnHeader>
<contents>
<messageTextInput id="${ui:concat('OsnovaniyaPrikazEnd:Id:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.newGroup_end2Id)}" text="${uix.current.OsnovaniyaPrikazEndId}" name="Id" promptAndAccessKey="&Id" rows="1" maximumLength="1" columns="1">
<onSubmitValidater>
<decimal/>
</onSubmitValidater>
</messageTextInput>
</contents>
</column>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdPrikaz')}" text="IdPrikaz"/>
</columnHeader>
<contents>
<messageTextInput id="${ui:concat('OsnovaniyaPrikazEnd:IdPrikaz:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.newGroup_end2IdPrikaz)}" text="${uix.current.OsnovaniyaPrikazEndIdPrikaz}" name="IdPrikaz" promptAndAccessKey="&IdPrikaz" rows="1" maximumLength="1" columns="1">
<onSubmitValidater>
<decimal/>
</onSubmitValidater>
</messageTextInput>
</contents>
</column>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdOsnovanie')}" text="На основании"/>
</columnHeader>
<contents>
<messageChoice id="${ui:concat('OsnovaniyaPrikazEnd:IdOsnovanie:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.IdOsnovanie)}" name="IdOsnovanie" promptAndAccessKey="&IdOsnovanie" selectedValue="${uix.current.newGroup_end2IdOsnovanie}">
<contents childData="${jhsTableBindings.Osnovaniya_not_viewVO_1T.rangeSet}">
<option value="${uix.current.Id}" text="${uix.current.Text}"/>
</contents>
<primaryClientAction>
<firePartialAction event="whenListChanged" formSubmitted="true" unvalidated="true" targets="${ui:cond(uix.current.isNewRow,'OsnovaniyaPrikazEnd', 'OsnovaniyaPrikazEnd')}"/>
</primaryClientAction>
</messageChoice>
</contents>
</column>
<column>
<columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
<columnHeader>
<sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdMoves')}" text="IdMoves"/>
</columnHeader>
<contents>
<messageChoice rendered="${uix.current.ListLength>'1'}" id="${ui:concat('OsnovaniyaPrikazEnd:IdMoves:',uix.current.tableIndex)}"
model="${ui:cond(uix.current.isNewRow,null,uix.current.OsnovaniyaPrikazEndIdMoves)}" name="IdMoves" promptAndAccessKey="&IdMoves"
selectedValue="${uix.current.newGroup_end2IdMoves}">
<contents childData="${uix.current.MovesList.inputValue}">
<option value="${uix.current.Id}" text="${uix.current.Fam1}"/>
</contents>
</messageChoice>
</contents>
</column>
<column>
<columnFormat displayGrid="true" columnDataFormat="iconButtonFormat"/>
<columnHeader>
<text text="Удалить?"/>
</columnHeader>
<contents>
<checkBox name="deleteRow" value="ok"/>
</contents>
</column>
</contents>
</table>
Thank you. -
Cascading EA4500s and Guest Network access
Hi, I hope esomone can help me here. I've got two EA4500 routers connected via ethernet. The primary router has DHCP enabled and the secondary has it disabled. IP address of primary is 192.168.1.1 and the secondary is 192.168.1.2.
I have set up guest access on both routers however only the primary router allows users to connect. When out of range of the primary router but in range of the secondary router the network is visible but when you try to connect to it, it only gives limited or no connectivity message and can't connect to the internet.
Is it possible for the guest network access to follow the same pattern as the secure network, i.e. the same network throughout the house?
Regards
JonCascading two routers should have correct parameters set. For instance, the Ethernet port of the secondary router should be connected to the ethernet port of the primary one, and the DHCP should be disabled on the second router. The ip address you've set are correct for the both routers. This thing shoud be done if the connection is LAN to LAN.
By the way there are two types of cascading: Click here for info!
For the Guest Network:
Guest Network would only work if the the DHCP is enabled on your router. It means to say that on the type of setup you're doing which is LAN to LAN (DHCP disabled on the second router), Guest network would not work on the secondary router. If the connection is LAN to WAN, then both of the router should have Guest Network working. -
Can I use cascading parameters in a fetchXML report.
I'm trying to write a report For CRM Online in FetchXML. I want to use pre-filtering to force users to run the report from the Account form so the results are limited to one account because my database is quite large and if they use
the Advanced Find they are likely to break the report.
So dataset1 uses a query which includes a pre-filtering parameter,
'@CRM_account'
I was hoping to add Dataset2 which would use a cascading parameter,
'@CRM_Org' that gets its value from the 'accountid' attribute in the query used for Databset1. When I run the report however. I get an error 'a parameter expected by the report has not been supplied.' It seems the value for the 2nd param for
dataset2 , '@CRM_Org' is not getting a value passed to it. Does anybody know if what I am attempting is possible in FetchXML ?
regards Alan WardI couldn't understand what is the use of second parameter. Your work can be done with one parameter.
Create your fetch with a parameter in it (say dataset1). Now create a fetchXML (say dataset2) that fetches you account id.
For the parameter from dataset1, set default value as "Get values from Query" and pass "account id " from dataset2 to it. That's it your job is done.
Note: Remember to select Forms for related record types in
Display In area and Account in Related Record Types area.
Jugal Kishore Dandamudi. -
Cascade parameter based on user input
Post Author: jalverson
CA Forum: Crystal Reports
I'm creating a quoting report for our product development group. They want a report where they input an item number, then have a drop down box that shows all the sales proposals that this item is on. The user will then select one of the proposals from the drop down box and run the report based on the item number and the proposal selected.
Cascading parameter works but the item list is too long (20k items) to select from. It is easier for the user to enter the item number they want. I can't figure out how to enter an item number in a parameter and then use it like a cascading parameter to populate the drop down box. If it helps, we are using Crystal Reports XI.
I appreciate your with this issue.
Jeffi think u can use GET /SET CURSOR command...check for sytax.
regards
Prabhu -
Cascading Prompt doesn't work in BO 4.0
Hi,
I want to create a cascading LOV in Information Design Tool with 2 dimensions, i.e:
Region --> City (LOV of City is subordinated to Region User Selection).
In List of Values tab of IDT I've created one LOV based on query panel with one dimesion "City" and on query filter one prompt on Region.
this is the code:
SELECT DISTINCT
"City"
FROM
"business Layer"
WHERE
"Region" = @prompt('Region','A','Region',Mono,Constrained,Persistent,,User:-1)
AND
"Business Layer"."REFERENCE_DATE" = @prompt(Key Date)
I've linked LOV to dimension City.
I've created one report with one prompt on City but when I launch the report an error occurs:
"Circular references : check your @select and @where calls (QTJ 00511) (WIS 00000)"
part of details:
"...Caused by: com.businessobjects.sdk.core.server.ServerException: Circular references : check your @select and @where calls (QTJ 00511)..."
Can you help me to solve this issue?
Thanks
Marco
System Info: SAP BO 4.0 SP 2 patch level 7
SAP BW 7.01 SP9
Edited by: marchino on Nov 18, 2011 4:32 PM
Edited by: marchino on Nov 18, 2011 4:36 PMHi,
Here are the steps to create cascading LOV's for the desired objects.
Tools menu > LOV > Create Cascading LOV > Then select your required object and move to the right side pane > Then GENERATE LOV.
Hope it helps. -
One Webi Report with multiple Cascade Prompts
HI
I have a requirement to create Cascading prompts on WebI reports. I have two questions.
1) Can one Webi report have two or more sets of Cascading prompts.
2) The universe is used by several groups of business useres. But only one group needs to have a Cascade prompts. Therefore, if i create Cascading prompts on Universe what is the impact to other business users who dont want the prompts as cascading prompts.
Please provide me this information.
Thanks in advance.Hi
Thanks for the repoly. Can you please provide me more information.
I understand that I need to do following steps.
1. copy existing universe as universe II.
2. link Universe II to Universe 1.
3. Create cascade prompts on Universe II.
4. Provide access to Business group with the requirement of cascade prompts to Universe II and rest of the groups to Universe I.
Please let me know if my understanding is right.
Maybe you are looking for
-
I have just upgraded to OSX 10.6.8 and now I cannot open or save PDF files from the internet using either Safari or Firefox. I get a dialogue box saying the QuickTime plugin has failed. Can anyone help?
-
Questions on 'Unmanaged File' and placing a PS file...
Hi... AI CS4 on Win XP Pro Service Pack 3.0 (32 bit) Two questions... 1/ Started noticing that the status bar at the bottom has "Unmanaged File" What does this mean? Clicking on it shows a menu. If i highlight / hover over "Show", i get several optio
-
How do I transfer photos from previous phone (not an iphone) to my iphone4s?
How do I transfer photos from previous phone (not an iphone) to my iphone4s?
-
Blinking problem with Nokia N80 phone
Hello, My J2ME application is blinking when scrolling within a textbox, when changing focus between items... my application wotks fine with other phone: nokia 7710. By blinking i mean that when you switch focus or scroll it always shows a white artif
-
Tool for highlighting a pattern in terminal
I'm looknig for a tool which can be used in terminal for highlighting patterns. For example $ cat fruits banana apple orange $ cat fruits | hilight_magic_tool apple banana apple # <-- highlightetd orange $ cat fruits | hilight_magic_tool strawberry b