CLOB Datatype with JDBC Adapter
Hi,
we try to fill a Clob Datatype to JDBC Database.
We try 2 ways with the JDBC Adapter:
action="SQL_DML" with an SQL Statment and $placeholders$
But how can i say the key element that it is a CLOB type?
He used this a VARCHAR and there a not more than 4k Chars allowed.
second way is action="EXECUTE" to call a Stored Procedure, but there we got the error that CLOB type is an Unsupported feature.
Any Idea?
Regards,
Robin
Message was edited by: Robin Schroeder
Ok i will check this...
But i'm right when i say that the only way to fill CLOB Type is to use a Stored Procedure ?
or is there any possibility to do this with action="SQL_DML" ?
Regards,
Robin
Similar Messages
-
Importing and Exporting Data with a Clob datatype with HTML DB
I would like to know what to do and what to be aware of when Importing and Exporting data with a Clob Datatype with HTML DB?
Colin - what kind of import/export operation would that be, which pages are you referring to?
Scott -
Calling a Stored Procedure with JDBC Adapter ?
I'm trying to call a Stored Procedure in my XI 3.0 JDBC adapter, but I get an "...invalid number of parameters...." error.
Does anyone have an example of a Query SQL Statement and the corresponding Stored procedure?
This is my test code. Eventually I would like to return a resultsett from the stored procedure.
Query SQL Statement:
call Sp_sapxi( 'F1' , 'xx' )
Stored Procedure:
CREATE OR REPLACE PROCEDURE Sp_sapxi (
transtype_in IN xi_flaggtest.TRANSTYPE%TYPE,
status_in IN xi_flaggtest.STATUS%TYPE)
IS
BEGIN
UPDATE xi_flaggtest
SET status = status_in
WHERE transtype = transtype_in;
END;
Regards,
Ellingyou can clear the field key tags mandatory in the XML Schema interpreter parameter and make the Empty string value to Empty string from null value.
For mapping : you can pass a value that is of the same format of date; but you can take your own value in the database since you are parsing the date format from one to other
thanks
nikhil -
Using long vs. clob datatype with Oracle 8.1.7 and interMedia
I am trying to determine the best datatype to use for a column I
wish to search using the interMedia contains() function. I am
developing a 100% java application using Oracle 8.1.7 on Linux.
I'd prefer to use the standard JDBC API's for PreparedStatement,
and not have to use Oracle extensions if possible. I've
discovered that there are limitations in the support for LOB's
in Oracle's 100% java driver. The PreparedStatement methods
like setAsciiStream() and setCharacterStream() are documented to
have flaws that may result in the corruption of data. I have
also noticed that socket exceptions sometimes occur when a large
amount of data is transferred. If I use the long datatype for
my table column, the setCharacterStream() method seems to
transfer the data correctly. When I try to search this column
using the interMedia contains() function, I get strange
results. If I run my search on Oracle 8.1.6 for Windows, the
results seem to be correct. If I run the same search on Oracle
8.1.7 for Linux, the results are usually incorrect. The same
searches seem to work correctly on both boxes when I change the
column type from long to clob. Using the clob type may not be
an option for me since the standard JDBC API's to transfer data
into internal clob fields are broken, and I may need to stick
with standard JDBC API's. My customer wishes to purchase a
version of Oracle for Linux that will allow us to implement the
search capability he requires. Any guidance would be greatly
appreciated.I've finally solved it!
I downloaded the following jre from blackdown:
jre118_v3-glibc-2.1.3-DYNMOTIF.tar.bz2
It's the only one that seems to work (and god, have I tried them all!)
I've no idea what the DYNMOTIF means (apart from being something to do with Motif - but you don't have to be a linux guru to work that out ;)) - but, hell, it works.
And after sitting in front of this machine for 3 days trying to deal with Oracle's, frankly PATHETIC install, that's so full of holes and bugs, that's all I care about..
The one bundled with Oracle 8.1.7 doesn't work with Linux redhat 6.2EE.
Don't oracle test their software?
Anyway I'm happy now, and I'm leaving this in case anybody else has the same problem.
Thanks for everyone's help. -
Clob datatype with pipelined table function.
hi
i made two functions one of them which use varchar2 data type with pipelined and
another with clob data type with pipelined.
i am giving parameters to both of them first varch2 with pipelined is working fine.
but another is not.
and i made diff type for both of them.
like clob object type for second.
and varchar2 type for first.
my first function is like
TYPE "CSVOBJECTFORMAT" AS OBJECT ( "S" VARCHAR2(500));
TYPE "CSVTABLETYPE" AS TABLE OF CSVOBJECTFORMAT;
CREATE OR REPLACE FUNCTION "FN_PARSECSVSTRING" (p_list
VARCHAR2, p_delim VARCHAR2:=' ') RETURN CsvTableType PIPELINED
IS
l_idx PLS_INTEGER;
l_list VARCHAR2(32767) := p_list;
l_value VARCHAR2(32767);
BEGIN
LOOP
l_idx := INSTR(l_list, p_delim);
IF l_idx > 0 THEN
PIPE ROW(CsvObjectFormat(SUBSTR(l_list, 1, l_idx-1)));
l_list := SUBSTR(l_list, l_idx+LENGTH(p_delim));
ELSE
PIPE ROW(CsvObjectFormat(l_list));
EXIT;
END IF;
END LOOP;
RETURN;
END fn_ParseCSVString;
and out put for this function is like
which is correct.
SQL> SELECT s FROM TABLE( CAST( fn_ParseCSVString('+588675,1~#588675^1^99^~2~16~115~99~SP5601~~~~~0~~', '~') as CsvTableType)) ;
S
+588675,1
#588675^1^99^
2
16
115
99
SP5601
S
0
14 rows selected.
SQL>
my second function is like
TYPE "CSVOBJECTFORMAT1" AS OBJECT ( "S" clob);
TYPE "CSVTABLETYPE1" AS TABLE OF CSVOBJECTFORMAT1;
CREATE OR REPLACE FUNCTION "FN_PARSECSVSTRING1" (p_list
clob, p_delim VARCHAR2:=' ') RETURN CsvTableType1 PIPELINED
IS
l_idx PLS_INTEGER;
l_list clob := p_list;
l_value VARCHAR2(32767);
BEGIN
dbms_output.put_line('hello');
LOOP
l_idx := INSTR(l_list, p_delim);
IF l_idx > 0 THEN
PIPE ROW(CsvObjectFormat1(substr(l_list, 1, l_idx-1)));
l_list := dbms_lob.substr(l_list, l_idx+LENGTH(p_delim));
ELSE
PIPE ROW(CsvObjectFormat1(l_list));
exit;
END IF;
END LOOP;
RETURN;
END fn_ParseCSVString1;
SQL> SELECT s FROM TABLE( CAST( fn_ParseCSVString1('+588675,1~#588675^1^99^~2~16~115~99~SP5601~~~~~0~~', '~') as CsvTableType1)) ;
S
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
and it goes on until i use ctrl+C to break it.
actually i want to make a function which can accept large values so i am trying to change first function.thanksRTFM DBMS_LOB.SUBSTR. Unlike built-in function SUBSTR, second parameter in DBMS_LOB.SUBSTR is length, not position. Also, PL/SQL fully supports CLOBs, so there is no need to use DBMS_LOB:
SQL> CREATE OR REPLACE
2 FUNCTION FN_PARSECSVSTRING1(p_list clob,
3 p_delim VARCHAR2:=' '
4 )
5 RETURN CsvTableType1
6 PIPELINED
7 IS
8 l_pos PLS_INTEGER := 1;
9 l_idx PLS_INTEGER;
10 l_value clob;
11 BEGIN
12 LOOP
13 l_idx := INSTR(p_list, p_delim,l_pos);
14 IF l_idx > 0
15 THEN
16 PIPE ROW(CsvObjectFormat1(substr(p_list,l_pos,l_idx-l_pos)));
17 l_pos := l_idx+LENGTH(p_delim);
18 ELSE
19 PIPE ROW(CsvObjectFormat1(substr(p_list,l_pos)));
20 RETURN;
21 END IF;
22 END LOOP;
23 RETURN;
24 END fn_ParseCSVString1;
25 /
Function created.
SQL> SELECT rownum,s FROM TABLE( CAST( fn_ParseCSVString1('+588675,1~#588675^1^99^~2~16~115~99~SP5
601~~~~~0~~', '~') as CsvTableType1)) ;
ROWNUM S
1 +588675,1
2 #588675^1^99^
3 2
4 16
5 115
6 99
7 SP5601
8
9
10
11
ROWNUM S
12 0
13
14
14 rows selected.
SQL> SY. -
JDBC does not support CLOB, as i figured out the hard way, or is
the version of JDBC that i have that is not supporting it.
Can someone advise me on how do i get around this problem?
Database that i connecting to has clob types.
Alex
nullAlex Korneyev (guest) wrote:
: JDBC does not support CLOB, as i figured out the hard way, or
is
: the version of JDBC that i have that is not supporting it.
: Can someone advise me on how do i get around this problem?
: Database that i connecting to has clob types.
: Alex
Follow this link for a tutorial on JDBC and CLOB using the
Oracle JDBC driver
http://www.oracle.com/ideveloper/99article/ta010199.html
Oracle Technology Network
http://technet.oracle.com
null -
Cmp connection over XI with jdbc adapter to sap r/3
Hi,
hope the subject is possible!
Is there some documentation which describe a successful appilication, that can get data from sap, and can write it back?
Thanks
PPeter
Message was edited by: Péter PappHi,
U can go through the following steps to perform an RFC call to SAP system
Steps:
<b>Design time:</b>1) Import the RFC into design time.
2) perfrom the required message mapping between source message and RFC .
3) perfrom the imterface mapping.
<b>
Configuration time :</b>
1) Create a sender agreement, receiver determination, interface determination and interface mapping, and receiver agreement.
In receiver agreement, use an RFC adapter ( receiver channel ) and provide the necessary parameters to connect to sAP system.
Links of help:
http://help.sap.com/saphelp_nw04/helpdata/en/25/76cd3bae738826e10000000a11402f/content.htm
hope this helps you,
Cheers,
Siva Maranani. -
Synchronous communication of JDBC adapter with BPM
Hello XI-Experts,
Could you please give me example where BPM is having a Synchronous communication with JDBC adapter??
plz do help.
Thanks & Regards,
VanitaVanita,
Let's consider the below scenario.
A File contains the SQL query, you need to fetch the data from DB system using that SQL query and write it to a file. You can configure like below
File Adapter to pick the file and send it to BPM
Mapping Transformation to create the SQL request
Call DB using JDBC adapter Synchronously
Mapping Transformation to Convert the Response from DB and write it to a file.
Does it seems to be a valid scenario you are looking for? Any questions let us know.
If you are looking for any blogs then check below:
Synchronous JDBC: /people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step
File-RFC-File: /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
~Raj. -
Clob DataType, NULL and ADO
Hello,
First, I'm french so my english isn't very good
I have a problem with Oracle Clob DataType. When I try to put NULL value to
CLOB DataType with ADO, changes aren't not made.
rs.open "SELECT ....", adocn, adOpenKeyset, adLockOptimistic
rs.Fields("ClobField") = Null ' In this case, the Update doesn't work
rs.update
rs.Close
This code works if I try to write a value which is different than Null but
not if is equal to Null. Instead of having Null, I have the old value
(before changes), the update of the field doesn't work.I experience the same, did you find a solution to your problem?
Kind regards,
Roel de Bruyn -
Sender JDBC adapter not picking up data
Hi,
I'm using an adpater to poll dta from two tables using the below query:
SELECT TPartOrderMaster., (the editor convert the star to bold), TPartOrderDetail. FROM TPartOrderMaster INNER JOIN TPartOrderDetail ON TPartOrderMaster.OdrNo = TPartOrderDetail.OdrNo WHERE (((TPartOrderMaster.DocStatusCode)='OA'))
UPDATE TPartOrderMaster SET LastUpdatedDate= GETDATE(), DocStatusCode='OP' WHERE DocStatusCode ='OA'
However, the adapter doesn't pick any data and gives the below log continuously.
11/13/09 5:35:50 PM 7c2bb696-0832-423d-2d59-8e955a3d6e6e Processing finished successfully
11/13/09 5:35:30 PM Processing started
11/13/09 5:33:50 PM 7c2bb696-0832-423d-2d59-8e955a3d6e6e Polling interval started. Length: 120.0 seconds
I have tried running th equery in the SQL server and it works properly.
I even tried restarting the adapter, inactivating and activating it, restarted the adapter in Visual admin. There are no locks for the jdbc adapter in the Visual admin.
Can anyone please suggest what other measures can I take to solve this issue.
Thanks and Regards,
Merrilly
Edited by: Merrilly Don Thomas on Nov 13, 2009 5:50 PMSELECT TPartOrderMaster., (the editor convert the star to bold), TPartOrderDetail. FROM TPartOrderMaster INNER JOIN TPartOrderDetail ON TPartOrderMaster.OdrNo = TPartOrderDetail.OdrNo WHERE (((TPartOrderMaster.DocStatusCode)='OA'))
I doubt whether this works with Jdbc adapter even though the query fetches data when executed on database. The query selects two tables (TPartOrderMaster and TPartOrderDetail) which could be problamatic. Instead can you list out the resultant table(after join) fields in Select query instead of table names?
Refer this blog-
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414800)ID0202753750DB11861200566708306426End?blog=/pub/wlg/1725 -
JDBC Adapter - Multiple Table Update - Sequence Number
I have to design a integration scenario where I will be updating 4 tables in a oracle database. One of these tables is a header table and the rest are detail tables. I have to generate a sequence number using Oracle Sequence number object which is one of the columns in the header table.
How can i use the Oracle SEquence number object to get the next value with JDBC Adapter?Use an Enhancement Spot
-
ORA-03115 Error using CLOB with JDBC
When I try to access CLOB field data with JDBC driver, I gets following error:
ORA-03115: unsupported network datatype or representation.
I am using JDBC 8.1.6(Thin), Oracle 8.0.5
on Linux OS.
what's the problem ?
Thank you for any help.
Taesoo.
nullif it is a bug, then its better to upgrade the database to 10.2.0.4. it is the stable verion in 10g.
-
Problem with JDBC Recever adapter while inserting the Hebrew charecters
HI All,
I am using the JDBC adapter at reciver side.
While I am inserting any hebrew charecters in database table all are getting converted into ??????
for this Do I need to use any specific datatype?
Please suggest...
Best Regards
ManishHi,
What it is showing in PI Target structure(Moni),it is showing valid format,if yes then speak with your data base team they may change data base settings to support your Hebrew characters.
Regards,
Raj -
How to copy a table with LONG and CLOB datatype over a dblink?
Hi All,
I need to copy a table from an external database into a local one. Note that this table has both LONG and CLOB datatypes included.
I have taken 2 approaches to do this:
1. Use the CREATE TABLE AS....
SQL> create table XXXX_TEST as select * from XXXX_INDV_DOCS@ext_db;
create table XXXX_TEST as select * from XXXX_INDV_DOCS@ext_db
ERROR at line 1:
ORA-00997: illegal use of LONG datatype
2. After reading some threads I tried to use the COPY command:
SQL> COPY FROM xxxx/pass@ext_db TO xxxx/pass@target_db REPLACE XXXX_INDV_DOCS USING SELECT * FROM XXXX_INDV_DOCS;
Array fetch/bind size is 15. (arraysize is 15)
Will commit when done. (copycommit is 0)
Maximum long size is 80. (long is 80)
CPY-0012: Datatype cannot be copied
If my understanding is correct the 1st statement fails because there is a LONG datatype in XXXX_INDV_DOCS table and 2nd one fails because there is a CLOB datatype.
Is there a way to copy the entire table (all columns including both LONG and CLOB) over a dblink?
Would greatelly appriciate any workaround or ideas!
Regards,
Pawel.Hi Nicolas,
There is a reason I am not using export/import:
- I would like to have a one-script solution for this problem (meaning execute one script on one machine)
- I am not able to make an SSH connection from the target DB to the local one (although the otherway it works fine) which means I cannot copy the dump file from target server to local one.
- with export/import I need to have an SSH connection on the target DB in order to issue the exp command...
Therefore, I am looking for a solution (or a workaround) which will work over a DBLINK.
Regards,
Pawel. -
JDBC-Adapter-Receiver Calling Stored Procedure with Input-Typ Record
Hallo,
I´ m trying calling a stored-procedure with two input-parameter; one of typ record (oracle) and one of type tabel of records. Is this possible (I think there are only types like string, integer etc. possible)? When not is there another possibility to work with that type?
Thanks in advance,
FrankHi Frank,
I think stored procedures will not take Array of Records as a Input. If you want to make a loop funtionality etc then JDBC adapter will work accordingly. You need to just call the stored procedure from the JDBC adapter. It will work for the array of records(multiple occurences).
Receiver JDBC Procedures.
/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
Alternative option is you can make use of Java Proxy and from there you can call stored procedure ..I think it is possible.. not tried.
Hope this helps
Regards,
Moorthy
Maybe you are looking for
-
Times on Palm desktop doesn't match handheld
I recently Bought a Palm Centro and with it came the newest version of Palm Desktop. I installed it and I hace this strange problem, in my Centro I have an appointment at 9:00am. In Palm Desktop, also appears at 9:00am, but when the alarm starts in t
-
How to create a hierarchy datasource in R/3
Hello, We use the 0MATERIAL_LKLS_HIER hierarchy datasource to load material hierachy in BW. I had to modify the function module that creates the data for 0MATERIAL_LKLS_HIER. Now, i need to create a new datasource based on the new function module. To
-
Satellite L30-PSL33 does not turn on from hibernation
Hello, as i mentioned in my previous post i also have a problem with hibernation.The thing is that when i leave it to hibernate and turn it on later sometimes it doesn't load Windows-the loading bar reaches its end and then it stops "thinking" so i h
-
Cannot upgrade my itunes 10 11.1
cannot upgrade my itunes to 11.1
-
Many JTextFields - Performance questions
I have written my own "table" which uses a JTextField for each cell, and null as Layout. I use (my own) tables with about 300 cells (=300 JTextFields). The application shows 1 to 7 tables which are all displayed in JScrollPanes. If I scroll on one ta