BC4J: Problem deleting a row with clob field
When I try to delete a row that contains a CLOB field.
When I call the function removeCurrentRow in my View object I get this exception:
JBO-25014: Another user has changed the row with primary key oracle.jbo.Key
Could anyone tell me why I can't remove the row? Thanks in advance!
null
This looks like a bug in TreeBinding. Please file this as a bug/tar with OracleSupport with your reproducible testcase (or steps to reproduce). Thanks.
Similar Messages
-
Understanding logminer results -- inserting row into table with CLOB field
In using log miner I have noticed that inserts into rows that contain a CLOB (I assume this applies to other LOB type fields as well, have only tested with CLOB so far) field are actually recorded as two DML entries.
--the first entry is the insert operation that inserts all values with an EMPTY_CLOB() for the CLOB field
--the second entry is the update that sets the actual CLOB value (+this is true even if the value of the CLOB field is not being set explicitly+)
This separation makes sense as there may be separate locations that the values are being stored etc.
However, what I am tripping over is the fact the first entry, the Insert, has a RowId value of 'AAAAAAAAAAAAAAAAAA' which is invalid if I attempt to use it in a flashback query such as:
SELECT * FROM PERSON AS OF SCN #####' where RowId = 'AAAAAAAAAAAAAAAAAA'The second operation, the Update of the CLOB field, has the valid RowId.
Now, again, this makes sense if the insert of the new row is not really considered "+done+" until the two steps are done. However, is there some way to group these operations together when analyzing the log contents to know that these two operations are a "+matched set+"?
Not a total deal breaker, but would be nice to know what is happening under the hood here so I don't act on any false assumptions.
Thanks for any input.
To replicate:
Create a table with CLOB field:
CREATE TABLE DEVUSER.TESTTABLE
ID NUMBER
, FULLNAME VARCHAR2(50)
, AGE NUMBER
, DESCRIPTION CLOB
);Capture the before SCN:
SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER FROM DUAL;Insert a new row in the test table:
INSERT INTO TESTTABLE(ID,FULLNAME,AGE) VALUES(1,'Robert BUILDER',35);
COMMIT;Capture the after SCN:
SELECT DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER FROM DUAL;Start logminer session with the bracketing scn values and options etc:
EXECUTE DBMS_LOGMNR.START_LOGMNR(STARTSCN=>2619174, ENDSCN=>2619191, -
OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG + DBMS_LOGMNR.CONTINUOUS_MINE + -
DBMS_LOGMNR.COMMITTED_DATA_ONLY + DBMS_LOGMNR.NO_ROWID_IN_STMT + DBMS_LOGMNR.NO_SQL_DELIMITER)Query the logs for the changes in that range:
SELECT
commit_scn, xid,operation,table_name,row_id
,sql_redo,sql_undo, rs_id,ssn
FROM V$LOGMNR_CONTENTS
ORDER BY xid asc,sequence# ascResults:
2619178 0C00070028000000 START AAAAAAAAAAAAAAAAAA set transaction read write
2619178 0C00070028000000 INSERT TESTTABLE AAAAAAAAAAAAAAAAAA insert into "DEVUSER"."TESTTABLE" ...
2619178 0C00070028000000 UPDATE TESTTABLE AAAFEXAABAAALEJAAB update "DEVUSER"."TESTTABLE" set "DESCRIPTION" = NULL ...
2619178 0C00070028000000 COMMIT AAAAAAAAAAAAAAAAAA commitEdited by: 958701 on Sep 12, 2012 9:05 AM
Edited by: 958701 on Sep 12, 2012 9:07 AMScott,
Thanks for the reply.
I am inserting into the table over a database link.
I am using the new version of HTML Db (2.0)
HTML Db is connected to an Oracle 10 database I think, however the table I am trying to insert data into (via the database link) is in an Oracle 8 database - this is why we created a link to it as we couldn't have the HTML Db interacting with the Oracle 8 database directly due to compatibility problems (or so I've been told)
Simon -
Problems While Working With CLOB fields
HI Friends,
I am facing one big problem while working with CLOB fields. I work in crystal reports in my project and My team is works in BMC Remedy tool. As per database configuration by default the date fields are stored in numbers. There is a field named Work Log which stores the complete history information of a ticket or a call.
While generating reports I convert the date fields from numbers into date values by using to_date function. But I am not able to change the dates mentioned in the worklog which is a CLOB field. As a result when I am generating reports text part of the work log is comming fine but the date fields are comming in numbers.
Please refer the below example:-
*1291012455anilkumarptesting*
Full Name:
PRG Name - EUC-APP PKGN1291012585anilkumarptesting
Full Name:
PRG Name - EUC-APP PKGN1291012631anilkumarptest
Full Name:
PRG Name - EUC-APP PKGN1291207510anilkumarpfd
Full Name: Anil Kumar Pantangi
PRG Name - Prod_Ops1291207535anilkumarpf
Full Name: Anil Kumar Pantangi
PRG Name - Prod_Ops
Assignment notification disabled for this transaction1291212517kapilbasd
Full Name: Anil Kumar Pantangi
PRG Name - Prod_Ops
See the first line of the worklog "1291012455anilkumarptesting", 1291012455 is referring a date value, but due to database configuration it's comming in number. All the other numbers in the above text are dates only which need's to be converted. These dates are captured in remedy tool when someone updates that ticket.
I am not able to decide how to change this numbers into dates. As it is containing lot's of numbers i am really confused how to come with a solution.
Can I expect a solution from you, atleast a way how to proceed resolving this problem. Should I have to write a procedure for this??
Please help..........
Kindly let me know if you need any more input.
Regards,
Arijit937670 wrote:
1291012455 represents a date value,What date value does it represent? Since it's not obvious to us what date you want that converted into, it's obviously hard for us to help. For example, perhaps you want that to be Jan 29, 2010 with "12455" representing a time component in some non-obvious format. Perhaps you want that to be December 1991 at 1:24:55. Perhaps you want to convert it to a completely different date. You're going to need to tell us in words how to convert your numeric data into a date.
My question is how can I convert all the numbers into date in the CLOB field and present it in a proper manner.Given your sample data, what do you expect the output to be? Do you expect many rows of data, one for every date in the CLOB? Do you expect a comma-separated list? Something else?
Justin -
Getting table script using dbms_metadata.get_ddl, but with clob field
So, Oracle 11g R2..
I'm using dbms_metadata.get_ddl to get table scripts and it's working fine..
now, I have a table with clob field, and it's not working... I got an 'missing right parenthesis (ora-0907)' error...
I could paste a script that I got, but I don't think it makes any sense..
does anybody have some experience on using this package on clob tables?
tnxthis is script that I got... it's long, and it looks like it's not good
CREATE TABLE "COMMON"."TEST_AAA2"
( "ID" NUMBER(10,0),
"TEKST" VARCHAR2(200 CHAR),
"UPDATESTAMP" DATE,
"OBJEKAT" CLOB,
CONSTRAINT "TEST_PART_PK2" PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS"
ALTER INDEX "COMMON"."TEST_PART_PK2" UNUSABLE ENABLE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMMON_DATA"
LOB ("OBJEKAT") STORE AS BASICFILE (
ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
NOCACHE LOGGING
STORAGE(
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT))
PARTITION BY RANGE ("UPDATESTAMP")
(PARTITION "P_201012" VALUES LESS THAN (TO_DATE(' 2011-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMMON_DATA"
LOB ("OBJEKAT") STORE AS BASICFILE (
TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
NOCACHE LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
PARTITION "P_201101" VALUES LESS THAN (TO_DATE(' 2011-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMMON_DATA"
LOB ("OBJEKAT") STORE AS BASICFILE (
TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
NOCACHE LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
PARTITION "P_201102" VALUES LESS THAN (TO_DATE(' 2011-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMMON_ARCHIVE"
LOB ("OBJEKAT") STORE AS BASICFILE (
TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
NOCACHE LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
PARTITION "P_201103" VALUES LESS THAN (TO_DATE(' 2011-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMMON_DATA"
LOB ("OBJEKAT") STORE AS BASICFILE (
TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
NOCACHE LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
PARTITION "P_201104" VALUES LESS THAN (TO_DATE(' 2011-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMMON_ARCHIVE"
LOB ("OBJEKAT") STORE AS BASICFILE (
TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
NOCACHE LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
PARTITION "P_201105" VALUES LESS THAN (TO_DATE(' 2011-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMMON_DATA"
LOB ("OBJEKAT") STORE AS BASICFILE (
TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
NOCACHE LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
PARTITION "P_201106" VALUES LESS THAN (TO_DATE(' 2011-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMMON_ARCHIVE"
LOB ("OBJEKAT") STORE AS BASICFILE (
TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
NOCACHE LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
PARTITION "P_201107" VALUES LESS THAN (TO_DATE(' 2011-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMMON_DATA"
LOB ("OBJEKAT") STORE AS BASICFILE (
TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
NOCACHE LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ,
PARTITION "P_MAXVALUE" VALUES LESS THAN (MAXVALUE)
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "COMMON_DATA"
LOB ("OBJEKAT") STORE AS BASICFILE (
TABLESPACE "COMMON_ARCHIVE" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
NOCACHE LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)) NOCOMPRESS ) -
Delete multiple rows with BC4J
I can't find anything on multi-delete with ADF.
Is it supported?
ViewObjectImpl v = (ViewObjectImpl)am.findViewObject("X");
ViewCriteria vc = v.getViewCriteria("Y");
v.applyViewCriteria(vc);
v.executeQuery();
v.removeAllSelectedRows(); //Delete all rows selected by vc "Y"
getDBTransaction().commit();
ThanksThanks Timo, I had figured that one out, that's how we did it in the first place but its not acceptable for my Use Case.
The goal for me is to have something that can scale, I don't want to loop through my millions of records and remove them one by one, hence take a hit on performance.
I assume there is somehow a way to do mass update/deletes with ADF/BC4J?
Cheers
JP -
Urgent!! How to delete a row with OrdImage (New)!!!
I got a problem when I attempt to delete a row that contains a Image in a view object:
I am using JDeveloper 3.2. And also I use BC4J for my project. I use a web bean to delete a row from a view object:
For example, the web bean contain the following method "deletePic", the part code is following:
try {
JSPApplicationRegistry jr = JSPApplicationRegistry.getInstance ();
ApplicationModule ei = jr.getAppModuleFromContexts("Testpackage_Test_TestAM", session, null);
ViewObject s = ei.findViewObject ("PicVO");
s.executeQuery ();
if (s.hasNext ())
s.next ().remove ();
ei.getTransaction().commit();
} catch (java.lang.Exception e) {
System.out.println (e.toString ());
I simply use the Row remove method to delete a row that contain a ORDImage Field. But I got the following error that is:
oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Delete": SQL Statement " DELETE FROM TESTTABLE Testtable WHERE TESTID=:1".
I check for this error only know this error ocurr when try to commit the transaction, but don't know how to solve it....
pls help me..thx.
nullHi Akira,
I created a table using the following SQL statement:
create table timg (id number primary key, image ordsys.ordimage);
Then I inserted some records. Next, I populated the images in some rows.
Then, I created a Business Components project. At last, I created a web bean and used this web bean in a JSP page.
In the web bean, I used your code but modified the applicationId string and view name string to reflect the ones on my machine.
The JSP ran successfully. The rows were deleted from the table by the web bean. I didn't see the exception. The database I am using is 817, the JDeveloper version is 3.2.3.
thanks,
Richard -
Using Oracle Text with CLOB field containing multiple languages
I'm using Oracle 10g (NLS_CHARACTERSET is set to. AL32UTF8) and have a table with a CLOB field which is storing text written in either English and/or Simplified Chinese.
The following index has been created on this field:
CREATE INDEX text_index
ON text_table(text_field)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('FILTER CTXSYS.INSO_FILTER');
I'm having issues in returning text which matches the Chinese text using the CONTAINS operator. For some reason the following query is returning rows which do not contain any Chinese text:
SELECT *
FROM text_table
WHERE contains(text_field,'炫%') > 1;
A newsgroup user advised me to produce an explain plan using ctx_query.explain.
I created 2 explain plans, one which was searching the index for 'A%' and the other searching for the Simplified Chinese character '炫%'. The results for the first test were as expected whereby the values contained within the OBJECT_NAME field all began with the letter 'A'.
The second test however produced somewhat unexpected results. The OBJECT_NAME field this time contained various words, both English and Simplified Chinese. I could be wrong but it appeared to store every individual word in the CLOB field. Both tests produced different EQUIVALENCE rows, the first test was:
OPTIONS = Null
OBJECT_NAME = A%
Whereas the second test produced:
OPTIONS = (?)
OBJECT_NAME = %
Am I right in thinking the Simplified Chinese character is for some reason being converted to a '?' character?
Any help on this will be much appreciated.As you're not specifying a lexer to use, it will use the BASIC_LEXER, designed for space-separated European-type languages. This won't work effectively with Chinese.
If you know which documents are Chinese and which are English, you can write this into a LANGUAGE column and use the MULTI_LEXER - this will allow you to specify BASIC_LEXER for the English texts, and CHINESE_LEXER or CHINESE_VGRAM_LEXER for the Chinese texts.
If you don't know the language, you must use either WORLD_LEXER (10g) or AUTO_LEXER (11g). These lexers will automatically determine the language of the documents and index them appropriately. In general. MULTI_LEXER will be faster and more accurate than either of the automatic alternatives.
When querying for Chinese characters you need to be very careful with your NLS_LANG settings. You need to make sure that the character set defined in NLS_LANG is the same as the character set from which you've pasted (or typed) the chinese characters.
The "?" in output usually just means "I don't know how to translate this character into your output character set". Sometimes it may appear as a reversed question mark. -
Hello,
I have got the following problem. I have got a table with data from my database. And a dataprovider to fetch the data from my rowset. I have got a button in each row of this table where i can get details or delete the corresponding row.
But when i click delete he wont delete the row correct. After a while i realised that the always fetch the same row. I dont understand why because i took the same code as it was used in the tutorial. For control i made a variable to remember the id of the fetched row but it wont change after the first "delete". Can somebody tell me why he wont change the value?
public String l�schen_action() {
try {
RowKey rowKey = tableRowGroup1.getRowKey();
int id = getSessionBean1().getMaxappid().parseInt(applikationDataProvider.getValue("APPID", rowKey).toString(), 10);
getSessionBean1().setTemp(id);
if(rowKey != null && applikationDataProvider.canRemoveRow(rowKey)){
applikationDataProvider.removeRow(rowKey);
applikationDataProvider.commitChanges();
applikationDataProvider.refresh();
} catch (Exception e) {
log("Fehler beim L\366schen des Eintrags", e);
error("Exception deleting row: " + e);
} // end try catch
return null;
Thanks in advance for help
AcinonyxTry this and see if that helps
Rowkey currentRowKey = (RowKey) getBean("currentRow");
- Winston
http://blogs.sun.com/roller/page/winston?catname=Creator -
Can't delete a row with a long raw in it
I have a table with a long raw column. I am using the following
to try to delete the row from a copy of 8i Lite:
stmt.executeUpdate("delete from blobs where blobid="+blobId);
My application hangs at this point. Any theories?
I am using this driver: oracle.lite.poljdbc.POLJDBCDriver
I am using the 1.2.2 jdk.
-Justin
nullI opened activity monitor, closed all programs associated with pdf, preview, etc., however that didn't work. A simple restart did the trick. Even though I could see the pdfs on my destop the files were deleted. That explains why I couldn't manipulate the file. Somehow the file got caught in the graphics string.......????
-
Data moving between Oracle 10g with CLOB fields
Hi all,
I have a trouble in migrate data between Oracle 10g with different platform. The worst thing is that I don't have a DBA account for the DB importing data. I think I can't use IMP or IMPDP in this way. So I seek help from sql developer, but it seems having another problem with CLOB data moving.
Re: EA2 : SQL Developer 1.5 : export data CLOB columns
in the thread, I found someone wrote this:
- SQL Developer v1.5 EA2 - exports first 4000 chars (which is anyway too small for me, because my CLOBs are larger - if they were smaller, I would have made them VARCHAR2s instead!).
I would like to ask:
1, What SQL Developer v1.5 EA2 is? Is it the Data Modeling one?
2, How to export table data with CLOB with SQL Developer v1.5 EA2? Since 4000 chars is enough for me to use.
OR any other method to export CLOB but not IMP / IMPDP ?
Now I am using the spool of sqlplus to export CLOB.
Many thanks,1. The EAs are Early Adapters, betas, so you should expect the same behaviour from the latest 1.5.4 production release.
2. Exports can be done with the Database Export tool, through the table's context menu in the navigator tree or the result grid's context menu.
Have fun,
K. -
Group by function with CLOB fields in Select statement
I have the following sql trying to query our database. Removing the Clob field (a.description) I am successful. But I need the Clob field (a.description). Here is my current sql
select a.id_number, a.id_owner, MAX (n.next_action_required)
KEEP (DENSE_RANK LAST ORDER BY n.modified_date),
MAX (n.modified_date) KEEP (DENSE_RANK LAST ORDER BY n.modified_date)
from table1 a, table2 n
where a.id_number = n.id_number
group by a.id_number, a.id_ownerI tried the following which works sometimes but not always because the Clob field (a.description)'s length varies; anywhere from 10 characters up to 12,000 characters. I get some blanks with the following and some where text is cut off. I may not be writing the dbms_lob.substr function correct.
select a.id_number, a.id_owner, MAX (n.next_action_required)
KEEP (DENSE_RANK LAST ORDER BY n.modified_date),
MAX (n.modified_date) KEEP (DENSE_RANK LAST ORDER BY n.modified_date) , DBMS_LOB.SUBSTR (a.description, 8001, 10000)
from table1 a, table2 n
where a.id_number = n.id_number
group by a.id_number, a.id_owner, DBMS_LOB.SUBSTR (a.description, 8001, 10000)Please help. Thank you,Maybe,
but throw it away if the combination a.id_number,a.id_owner,n.next_action_required(a.id_number = n.id_number),n.modified_date(a.id_number = n.id_number) is not unique
select nd.id_number,
nd.id_owner,
nd.next_action_required,
nd.modified_date,
a.description
from (select a.id_number,
a.id_owner,
MAX (n.next_action_required) KEEP (DENSE_RANK LAST ORDER BY n.modified_date) next_action_required,
MAX (n.modified_date) KEEP (DENSE_RANK LAST ORDER BY n.modified_date) modified_date
from table1 a,
table2 n
where a.id_number = n.id_number
group by a.id_number,
a.id_owner
) nd,
table1 a
where nd.id_number = a.id_number
and nd.id_owner = a.id_owner
and nd.id_number = (select id_number
from table2
where next_action_required = nd.next_action_required
and modified_date = nd.modified_date
)Regards
Etbin -
Remove/delete the row with Report Name above header while exporting SSRS to excel
I wanted to make sure to delete the top most row with Report name in SSRS report while exporting to excel.
I didn't find any way to do so, My report don't need a report name actually i deleted the text still a blank row appears in excel.
Is there any property hidden i need to look for this requirement?Invalid definition.
The report definition is not valid.
Details: The report definition has an invalid target namespace
'http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition'
which cannot be upgraded. (rsInvalidReportDefinition) -
Problems in transaction F871,with the field docuemnt type:
Hello,m
I´m trying to create a Payment Request with transaction F871,and I have a problem with the field docuemnt type that is mandatory, when I try to open the match code there is no values, and a message is displayed as follows: " No document type assigned to request category 01 "Hello Olga,
Thanks for your words in the other thread. In any case your english is perfect, it is not my mother language also so apologize my errors too
Please check if you have done this customizing:
SPRO -> Public Sector Management -> Funds Management Government -> Funds Management-Specific Postings -> Requests -> Request Types -> Assign Request Category to FI Document Type
I hope it helps.
Greetings from Brazil
Vanessa. -
Problems sending an email with a field attached.
Hi everyone,
Im having problems with sending an e-mail (with a field attached) to an external e-mail address.
Im using the followings functions:
<b>'SO_DOCUMENT_INSERT'
'SO_OBJECT_UPLOAD'
'SO_ATTACHMENT_INSERT'
'SO_OBJECT_SEND'</b>
Everything goes well (the functions are executed well), but the message stacks and it isnt be sent.
I can see it with the transaction SBWP, it is in the folder Exit/Documents with status: Waiting communication service .
Then I can send it from there clicking at the button send. And then it is sent.
Have anyone any clue about what Ive missed to do.
I really appreciate your help; I need to solve this problem as soon as possible.
Kind regards.Hai
report zemail no standard page heading line-size 220.
data: message_content like soli occurs 10 with header line,
receiver_list like soos1 occurs 5 with header line,
w_object_hd_change like sood1.
start-of-selection.
Receivers
receiver_list-recextnam = '[email protected]'.
receiver_list-recesc = 'E'.
receiver_list-sndart = 'INT'
receiver_list-sndpri = '1'.
append receiver_list.
General data
w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Object name'.
w_object_hd_change-objsns = 'P'.
w_object_hd_change-file_ext = 'HTM'. "<--this is important
Mail subject
w_object_hd_change-objdes = 'HTML from SAP/ABAP'.
Mail body
append 'Message content' to message_content.
append '<b>How''s this for sending HTML E-mail from SAP?</b>' to
message_content.
append '<p>New paragraph</p>' to message_content.
append '<p>Apostrophe’s</p>' to message_content.
Call function to send email - SAPConnect needs to be configured
call function 'SO_OBJECT_SEND'
exporting
object_hd_change = w_object_hd_change
object_type = 'RAW'
owner = sy-uname
tables
objcont = message_content
receivers = receiver_list.
2)
ABAP CODE
Email ITAB structure
DATA: BEGIN OF EMAIL_ITAB OCCURS 10.
INCLUDE STRUCTURE SOLI.
DATA: END OF EMAIL_ITAB.
DATA: T_EMAIL LIKE SOOS1-RECEXTNAM. "EMail distribution list
CONSTANTS: C_EMAIL_DISTRIBUTION LIKE SOOS1-RECEXTNAM VALUE
[email protected],[email protected].
Initialization
REFRESH EMAIL_ITAB.
Populate data
EMAIL_ITAB-LINE = Email body text 1.
APPEND EMAIL_ITAB.
EMAIL_ITAB-LINE = Email body text 2.
APPEND EMAIL_ITAB.
T_EMAIL = C_EMAIL_DISTRIBUTION.
--- EMAIL FUNCTION ---------------------------------------------------
REQUIRMENTS:
1) The user running the program needs a valid email address in their
address portion of tx SU01 under external comms -> SMTP -> internet
address.
2) A job called SAP_EMAIL is running with the following parameters:
Program: RSCONN01 Variant: INT User: XXX
This program moves mail from the outbox to the mail server using
RFC destination: SAP_INTERNET_GATEWAY_SERVER
INTERFACE:
1) APPLICATION: Anything
2) EMAILTITLE: EMail subject
3) RECEXTNAM: EMail distribution lists separated by commas
4) TEXTTAB: Internal table for lines of the email message
EXCEPTIONS:
Send OK = 0 otherwise there was a problem with the send.
CALL FUNCTION 'Z_SEND_EMAIL_ITAB'
EXPORTING
APPLICATION = 'EMAIL'
EMAILTITLE = 'Email Subject'
RECEXTNAM = T_EMAIL
TABLES
TEXTTAB = EMAIL_ITAB
EXCEPTIONS
OTHERS = 1.
Function Z_SEND_EMAIL_ITAB
""Local interface:
*" IMPORTING
*" VALUE(APPLICATION) LIKE SOOD1-OBJNAM
*" VALUE(EMAILTITLE) LIKE SOOD1-OBJDES
*" VALUE(RECEXTNAM) LIKE SOOS1-RECEXTNAM
*" TABLES
*" TEXTTAB STRUCTURE SOLI
*- local data declaration
DATA: OHD LIKE SOOD1,
OID LIKE SOODK,
TO_ALL LIKE SONV-FLAG,
OKEY LIKE SWOTOBJID-OBJKEY.
DATA: BEGIN OF RECEIVERS OCCURS 0.
INCLUDE STRUCTURE SOOS1.
DATA: END OF RECEIVERS.
*- fill odh
CLEAR OHD.
OHD-OBJLA = SY-LANGU.
OHD-OBJNAM = APPLICATION.
OHD-OBJDES = EMAILTITLE.
OHD-OBJPRI = 3.
OHD-OBJSNS = 'F'.
OHD-OWNNAM = SY-UNAME.
*- send Email
CONDENSE RECEXTNAM NO-GAPS.
CHECK RECEXTNAM <> SPACE AND RECEXTNAM CS '@'.
*- for every individual recipient send an Email
(see OSS message 0120050409/0000362105/1999)
WHILE RECEXTNAM CS ','.
PERFORM INIT_REC TABLES RECEIVERS.
READ TABLE RECEIVERS INDEX 1.
RECEIVERS-RECEXTNAM = RECEXTNAM+0(SY-FDPOS).
ADD 1 TO SY-FDPOS.
SHIFT RECEXTNAM LEFT BY SY-FDPOS PLACES.
MODIFY RECEIVERS INDEX 1.
PERFORM SO_OBJECT_SEND_REC
TABLES TEXTTAB RECEIVERS
USING OHD.
ENDWHILE.
*- check last recipient in recipient list
IF RECEXTNAM <> SPACE.
PERFORM INIT_REC TABLES RECEIVERS.
READ TABLE RECEIVERS INDEX 1.
RECEIVERS-RECEXTNAM = RECEXTNAM.
MODIFY RECEIVERS INDEX 1.
PERFORM SO_OBJECT_SEND_REC
TABLES TEXTTAB RECEIVERS
USING OHD.
ENDIF.
ENDFUNCTION.
FORM SO_OBJECT_SEND_REC *
FORM SO_OBJECT_SEND_REC
TABLES OBJCONT STRUCTURE SOLI
RECEIVERS STRUCTURE SOOS1
USING OBJECT_HD STRUCTURE SOOD1.
DATA: OID LIKE SOODK,
TO_ALL LIKE SONV-FLAG,
OKEY LIKE SWOTOBJID-OBJKEY.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
EXTERN_ADDRESS = 'X'
OBJECT_HD_CHANGE = OBJECT_HD
OBJECT_TYPE = 'RAW'
OUTBOX_FLAG = 'X'
SENDER = SY-UNAME
IMPORTING
OBJECT_ID_NEW = OID
SENT_TO_ALL = TO_ALL
OFFICE_OBJECT_KEY = OKEY
TABLES
OBJCONT = OBJCONT
RECEIVERS = RECEIVERS
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
X_ERROR = 20
OTHERS = 21.
IF SY-SUBRC <> 0.
RAISE OTHERS.
ENDIF.
ENDFORM.
FORM INIT_REC *
FORM INIT_REC TABLES RECEIVERS STRUCTURE SOOS1.
CLEAR RECEIVERS.
REFRESH RECEIVERS.
MOVE SY-DATUM TO RECEIVERS-RCDAT .
MOVE SY-UZEIT TO RECEIVERS-RCTIM.
MOVE '1' TO RECEIVERS-SNDPRI.
MOVE 'X' TO RECEIVERS-SNDEX.
MOVE 'U-' TO RECEIVERS-RECNAM.
MOVE 'U' TO RECEIVERS-RECESC.
MOVE 'INT' TO RECEIVERS-SNDART.
MOVE '5' TO RECEIVERS-SORTCLASS.
APPEND RECEIVERS.
ENDFORM.
3)
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
DATA L_NUM(3).
Creation of the document to be sent
File Name
DOC_CHNG-OBJ_NAME = 'SENDFILE'.
Mail Subject
DOC_CHNG-OBJ_DESCR = 'Delivered Mail'.
Mail Contents
OBJTXT = 'Object text'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Creation of the entry for the compressed document
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
Creation of the document attachment
LOOP AT ITAB_DATA.
CONCATENATE ITAB_DATA-PRODUCTOR
ITAB_DATA-VBELN
ITAB_DATA-POSNR
ITAB_DATA-MATNR INTO OBJBIN.
APPEND OBJBIN.
ENDLOOP.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJHEAD = 'ORDERS'.
APPEND OBJHEAD.
Creation of the entry for the compressed attachment
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 1.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'TXT'.
OBJPACK-OBJ_NAME = 'WEBSITE'.
OBJPACK-OBJ_DESCR = 'ORDERS.TXT'.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
Completing the recipient list
target recipent
clear RECLIST.
RECLIST-RECEIVER = '[email protected]'.
RECLIST-EXPRESS = 'X'.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
copy recipents
clear RECLIST.
RECLIST-RECEIVER = '[email protected]'.
RECLIST-EXPRESS = 'X'.
RECLIST-REC_TYPE = 'U'.
RECLIST-COPY = 'X'.
APPEND RECLIST.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
ENDFORM. " SEND_MAIL
Thanks & Regards
Sreeni -
Problem deleting from table with xmltype column
Hi,
Using a standard, simple screen (generated from JHeadstart), I don't seem to be able to delete from a table including an xmltype column. I have tried it even with a very simple mock table with only one column, an xmltype column, and every time I check the "delete" box and click "save", I get the following error:
oracle.jbo.RowInconsistentException: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[33 ].
I have tried this in the JDeveloper application module tester too and the result is the same.
Is it possible to delete a row from a table with an xmltype column? Am I doing something wrong? Is there something special needs done?
As I say, I did this with a one-xmltype-column table using the "Business Components from Tables" wizard, accepting all the defaults.
Thanks,
DarrenIn short you want
SELECT extractvalue(myxml, '/PurchaseOrder/Reference')
FROM dab_test;This difference is that for dab_xml, there are no columns defined for the table, therefore you are [OBJECT_VALUE|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/pseudocolumns006.htm#sthref830] as an alias for a non existent column.
With dab_test, you have a column that contains the XML so you need to use that column name instead of OBJECT_VALUE.
Maybe you are looking for
-
How can i get a software update for an original ipod
????????
-
System Preferences freezes in 10.9
Hi, I am running a mid-2012, 13" Macbook Pro with 8Gb of RAM, and have installed Mavericks. Mostly everything is running fine (some strange occasional scrolling weirdness with Safari notwithstanding) - but I am continually encountering a problem with
-
Tomcat 5.0.25 persisting session data by default ?!?
This is, I imagine, a dumb question, but I can't quite figure out what is happening by looking at past postings. When I start Tomcat I get an error : "IOException while loading persisted sessions" because some classes we use are not serializable. Tha
-
Adding tags to RSS feed with Podomatic to change hosting location
I'm currently using Podomatic to host my podcasts but I want to move to a different service. I know that I need to add <itunes:new-feed-url> in the RSS feed for iTunes to see the change but I'm not seeing where I'm able to manually do that in Podoma
-
Starting Weblogic 6.1 failure extracting WAR classes file access denied
When I start Weblogic I get following error <[WebAppServletContext(4057696,cert ificate,/certificate)] failure extracting WAR classes java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java. When