Oracle Long Data type Problem
Hi,
I am using ORACLE 7.3.4 database. I am having a problem in updating a column of long datatype in a table t1 with another column from table t2 of long datatype. I have tried setting LONG 1000000 also but this doesn't work. I appreciate any kind of suggestions.
The error it gives is ORA-00997: illegal use of LONG datatype.
Thanks
Reddy
I had the same problem too with a newest thin driver. I found that I can read all my characters (bytes) using getBinaryStream() and single-byte read(), but read() never returns -1; instead reading the character before last causes the ArrayOutOfBoundsException you mentioned.
So I just blindly caught the exception and let it go to QA. (sort of
InputStream r = rs.getBinaryStream(field);
if(r == null) ...
StringBuffer sb = new StringBuffer();
try { for(int c = -1; (c = r.read()) != -1;) sb.append((char) c); }
catch(IndexOutOfBoundsException e)
{} // ignore Oracle idiosyncrazy.
finally { r.close(); }
). Please note that getCharacterStream() or getAsciiStream() did not work for me. I did not try deprecated getUnicodeStream(): I decided I would better correctly extract characters in Java from binary data myself if I need them rather than allowing this junky thin Oracle driver to do an extra thing for me.
Similar Messages
-
ADF View Object query to use Oracle LONG data type
Hi,
I'm using a view object that uses Oracle LONG data type.The following exception is thrown
*"java.sql.SQLException: Stream has already been closed"* and it is not fetching the correct data.
I have searched in many forums,they suggested to use LOB instead of LONG as LONG is deprecated. But in my case I can't avoid using LONG as some of my legacy applications using the same DB.
Please suggest me a way
Thanks in Advance
FelixThanks for your reply Arun,
I have solved this problem using the solution suggested by this blog [AskTom-Link|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:839298816582]
In the above blog link,they have suggested to convert Long to Varchar by functions and asked to use this function in the column.
Thank you all guys who have seen this post.
Regards,
Felix -
Can't update oracle Long data type
Hi All,
Setup
Weblogic 5.1.0sp11, oracle 8.1.6, Solaris8, classes12.zip,
Solaris_JDK_1.2.1_03a
ConnectionPool:
weblogic.jdbc.connectionPool.XXXDBPool=\
url=jdbc:oracle:thin:@10.2.30.50:1521:ZZZZ,\
driver=oracle.jdbc.driver.OracleDriver,\...etc
Problem
I can't seem to write to (insert/update) an oracle type Long column
using connections from the weblogic connection pool. Each entry(as
XML) into this column is fairly large (>1MB). Reading from works fine,
however.
The same configuration(minus connection pool and associated
code/config) via tomcat works fine(read/write), so I'm thinking the
weblogic connection pool is giving me a connection object which
doesn't update this Long column properly.
Using the usual(again works fine for tomcat) :-
//Url = jdbc:weblogic:pool:XXXDBPool
//driver = weblogic.jdbc.pool.Driver
stat = con.prepareStatement("UPDATE BM_RM_USER_DIARY set DIARY=? where
id=?");
//stat.setString(1,diaryData); //use an inputstream instead.
ByteArrayInputStream bais = new
ByteArrayInputStream(diaryData.getBytes());
//StringBufferInputStream bais = new
StringBufferInputStream(diaryData); //deprecated
stat.setAsciiStream(1, bais, bais.available());
stat.setLong(2,userId);
I'm not getting any errors from this update, so I can't really see
what I might be doing wrong. It just returns fine as if it has
succeeded (rows updated = 1)
Assuming I CAN NOT change these settings, are there any other ways I
can programmatically get these inserts working ? Is this even a known
issue ? as i can't find a problem in these postings that quite matches
mine.
Any help appreciated.
Cheers
AlkeshHi All
Just to follow up on this.
The problem was solved by explicitly calling commit() after
the update has taken place.
It seems as though my connection from the connection pool has
autocommit set to false.
Thanks
Alkesh
[email protected] (Alkesh) wrote in message news:<[email protected]>...
Hi All,
Setup
Weblogic 5.1.0sp11, oracle 8.1.6, Solaris8, classes12.zip,
Solaris_JDK_1.2.1_03a
ConnectionPool:
weblogic.jdbc.connectionPool.XXXDBPool=\
url=jdbc:oracle:thin:@10.2.30.50:1521:ZZZZ,\
driver=oracle.jdbc.driver.OracleDriver,\...etc
Problem
I can't seem to write to (insert/update) an oracle type Long column
using connections from the weblogic connection pool. Each entry(as
XML) into this column is fairly large (>1MB). Reading from works fine,
however.
The same configuration(minus connection pool and associated
code/config) via tomcat works fine(read/write), so I'm thinking the
weblogic connection pool is giving me a connection object which
doesn't update this Long column properly.
Using the usual(again works fine for tomcat) :-
//Url = jdbc:weblogic:pool:XXXDBPool
//driver = weblogic.jdbc.pool.Driver
stat = con.prepareStatement("UPDATE BM_RM_USER_DIARY set DIARY=? where
id=?");
//stat.setString(1,diaryData); //use an inputstream instead.
ByteArrayInputStream bais = new
ByteArrayInputStream(diaryData.getBytes());
//StringBufferInputStream bais = new
StringBufferInputStream(diaryData); //deprecated
stat.setAsciiStream(1, bais, bais.available());
stat.setLong(2,userId);
I'm not getting any errors from this update, so I can't really see
what I might be doing wrong. It just returns fine as if it has
succeeded (rows updated = 1)
Assuming I CAN NOT change these settings, are there any other ways I
can programmatically get these inserts working ? Is this even a known
issue ? as i can't find a problem in these postings that quite matches
mine.
Any help appreciated.
Cheers
Alkesh -
Problem loading PostgreSQL Bytea data type to Oracle Raw data type
We are migrating our database from PostgreSQL to Oracle. First, we convert the BYTEA data type in PostgreSQL to Oracle RAW. The BYTEA data type is variable bytes array. How can we load the BYTEA data type to Oracle RAW data type? Or I have to convert to different data type. thanks.
Peter,hi,
Instead of 'interval day to second' in method declaration use internal datatype 'DSINTERVAL_UNCONSTRAINED'.
There are more unconstrained types in oracle.
Bartek -
How to display images in BI Publisher from a LONG data type
We are storing images in Oracle Database as LONG data type. When I am giving query in BI Publisher and view the XML generated, I am getting the following error.
name was started with an invalid character. Error processing resource 'http://.......
<X_SIGNATURE>"N!0$$$$$$$#B!0$$$"X$$$$!3$$$!2$$#a$$$!1$!1$$$$$d$$$$#7$"X!0$"}@E$e"1"XM">K#@!P!P!Ga}!1!@!P!C#C"O!>...
Can anyone suggest the solution?Hi
my problem is, for each job_id there is many users. Oh that's something completlty different...
I Strongly Recommand to_
1.*create 2 tables Jobs & users*
2.*create a relation between them* 1 to many to get for each job more than a user that's the way that Must be -- execuse me the bad design of the db pulled u into this trap -
3.then u can deal with it normally no need to a sample code but just a form with Jobs as (Master) and Users as (detail) with a relation and with a simple query u can display each job_id is for many users.
no null values no commas r needed.
Hope this helps...
Regards,
Amatu Allah. -
LONG data types producing errors in 10.1.2.48.18
Maybe I should already know this but...
I am getting the " Internal Error has occured " message when I attempt to add a field which is defined as a LONG data type. Can Discoverer handle these fields ? If so is there a setting I am suppose to change ?
thanks
OBXI know the BLOB problem has come up before as no, I don't think Discoverer will handle them directly (ie: there are example using pl/sql to handle the BLOB first).
However, I did try just pointing to the eul4_documents table where there is a BLOB (the actual workbook apparently). When I created the folder pointing to that Oracle table I did not get an error in Discoverer Admin.
Then I created a workbook against that folder bringing everything back. There is no data displayed for the BLOB (doc_document I believe), but I don't get an error. This was - as you may have gathered from the EUL tablename - using Discoverer v4.x. I wonder if it's now different in v10g?
Just an fyi.
Russ -
Using Long Data type in the Page
Hi ,
I have a page (in multiple page creation form ) which is suppose to contain only the NOTES field of the entity being created . The Notes field is defined as LONG data type in the table.
Two Doubts.
1. As of now in Jdev , u only have Varchar2 data type when assigning to any messageText layout item. What should be the max value set for Max Lenght of this field on the form . I suppose its 32k+ ,since its Long Field .
Anybody has used Long notes field before ??
2. This page has only one item on it , ie Notes ,which i have defined as messageRichText as style. I have been trying to resize this item ,so that it stretches out on entire page . But it just doesnt resizes .. any idea ..below is my PG.xml code
<?xml version = '1.0' encoding = 'UTF-8'?>
<!-- dbdrv: exec java oracle/jrad/tools/xml/importer XMLImporter.class java &phase=dat+24 checkfile:~PROD:~PATH:~FILE &fullpath:~PROD:~PATH:~FILE -username &un_apps -password &pw_apps -dbconnection &jdbc_db_addr -userId "1" -rootPackage /oracle/apps/~PROD -rootdir &fullpath:~PROD:mds:directory -->
<page xmlns:jrad="http://xmlns.oracle.com/jrad" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:ui="http://xmlns.oracle.com/uix/ui" version="9.0.3.8.13_1426" xml:lang="en-US" xmlns:user="http://xmlns.oracle.com/jrad/user" xmlns="http://xmlns.oracle.com/jrad" file-version="$Header$">
<content>
<oa:pageLayout id="NotesMainR" amDefName="oracle.apps.xxi.pro.server.ProAM" windowTitle="Pro Notes" controllerClass="oracle.apps.xxi.pro.webui.ProNotesCO">
<ui:corporateBranding>
<oa:image id="corporateBrandingImage" source="/OA_MEDIA/FNDSSCORP.gif"/>
</ui:corporateBranding>
<ui:contents>
<oa:messageComponentLayout id="ProInfoR" extends="/oracle/apps/xxi/pro/webui/ProInfoRN"/>
<oa:pageButtonBar id="PgButton">
<ui:contents>
<oa:submitButton id="Back" use="/oracle/apps/fnd/attributesets/Buttons/Back" unvalidated="true" serverUnvalidated="false"/>
<oa:submitButton id="Save" use="/oracle/apps/fnd/attributesets/Buttons/Save"/>
<oa:submitButton id="Continue" use="/oracle/apps/fnd/attributesets/Buttons/Continue"/>
</ui:contents>
</oa:pageButtonBar>
<oa:tableLayout id="region3" hAlign="center">
<ui:contents>
<oa:rowLayout id="region4" hAlign="left" vAlign="top" width="100%">
<ui:contents>
<oa:cellFormat id="region5" height="100%" width="100%" hAlign="left" columnSpan="1" vAlign="top">
<ui:contents>
<oa:header id="region6" text="Notes In Table Layout">
<ui:contents>
<oa:messageRichTextEditor id="ProNotesI" maximumLength="20000" viewName="CustomerPOVO" viewAttr="ProNotes" fontBar="true" alignmentGroup="true" tipType="shortTip" prompt="Pro Notes" richTextModeDisplayHeight="100%" richTextModeDisplayLength="100%"/>
</ui:contents>
</oa:header>
</ui:contents>
</oa:cellFormat>
</ui:contents>
</oa:rowLayout>
</ui:contents>
</oa:tableLayout>
</ui:contents>
</oa:pageLayout>
</content>
</page>
any idea??
thanksHi Padma,
Thanks for reply !!
The width is still pain point for me ,as i am unable to increase its width .
I tried increasing the width of the table to 100%, however ,it still doesn work .
Any pointers ??
If you have used this widget before , could you assist me with any sample code u hv ??
I would really appreciate it
thanks -
Using DBMS_DATAPUMP with LONG data type
I've got a procedure below that calls the DBMS_DATAPUMP procedure using a REMOTE_LINK to move a schema from one database to another. However, a couple of the tables within that schema have columns with the LONG data type. And when I run it I get an error saying that you cannot move data with the LONG data type using a REMOTE LINK. So no data in those particular tables gets moved over.
Has anyone else had this issue? If so, do you have a work around? I tried adding a CLOB column to my table and setting the new CLOB to equal the LONG, but I couldn't get that to work either...even when I tried using a TO_LOB. If I could get that to, then I could just drop the LONG, move the schema, then recreate the LONG column on the opposite side.
Here's my procedure....
DECLARE
/* EXPORT/IMPORT VARIABLES */
v_dp_job_handle NUMBER ; -- Data Pump job handle
v_count NUMBER ; -- Loop index
v_percent_done NUMBER ; -- Percentage of job complete
v_job_state VARCHAR2(30) ; -- To keep track of job state
v_message KU$_LOGENTRY ; -- For WIP and error messages
v_job_status KU$_JOBSTATUS ; -- The job status from get_status
v_status KU$_STATUS ; -- The status object returned by get_status
v_logfile NUMBER ;
v_date VARCHAR2(13) ;
v_source_server_name VARCHAR2(50) ;
v_destination_server_name VARCHAR2(50) ;
BEGIN
v_project := 'TEST' ;
v_date := TO_CHAR(SYSDATE, 'MMDDYYYY_HHMI') ;
v_source_server_name := 'TEST_DB' ;
v_dp_job_handle := DBMS_DATAPUMP.OPEN(
OPERATION => 'IMPORT',
JOB_MODE => 'SCHEMA',
REMOTE_LINK => v_source_server_name,
JOB_NAME => v_project||'_EXP_'||v_date,
VERSION => 'LATEST') ;
v_logfile := DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE ;
DBMS_DATAPUMP.ADD_FILE(
HANDLE => v_dp_job_handle,
FILENAME => v_project||'_EXP_'||v_date||'.LOG',
DIRECTORY => 'DATAPUMP',
FILETYPE => v_logfile) ;
DBMS_DATAPUMP.METADATA_FILTER(
HANDLE => v_dp_job_handle,
NAME => 'SCHEMA_EXPR',
VALUE => '= '''||v_project||''' ') ;
DBMS_DATAPUMP.START_JOB(v_dp_job_handle) ;
v_percent_done := 0 ;
v_job_state := 'UNDEFINED' ;
WHILE (v_job_state != 'COMPLETED') AND (v_job_state != 'STOPPED')
LOOP
DBMS_DATAPUMP.GET_STATUS(
v_dp_job_handle,
DBMS_DATAPUMP.KU$_STATUS_JOB_ERROR + DBMS_DATAPUMP.KU$_STATUS_JOB_STATUS + DBMS_DATAPUMP.KU$_STATUS_WIP,
-1,
v_job_state,
v_status) ;
v_job_status := v_status.JOB_STATUS ;
IF v_job_status.PERCENT_DONE != v_percent_done THEN
DBMS_OUTPUT.PUT_LINE('*** Job percent done = '||TO_CHAR(v_job_status.PERCENT_DONE)) ;
v_percent_done := v_job_status.PERCENT_DONE ;
END IF ;
IF BITAND(v_status.MASK, DBMS_DATAPUMP.KU$_STATUS_WIP) != 0 THEN
v_message := v_status.WIP ;
ELSIF BITAND(v_status.mask, DBMS_DATAPUMP.KU$_STATUS_JOB_ERROR) != 0 THEN
v_message := v_status.ERROR ;
ELSE
v_message := NULL ;
END IF ;
IF v_message IS NOT NULL THEN
v_count := v_message.FIRST ;
WHILE v_count IS NOT NULL
LOOP
DBMS_OUTPUT.PUT_LINE(v_message(v_count).LOGTEXT) ;
v_count := v_message.NEXT(v_count) ;
END LOOP ;
END IF ;
END LOOP ;
DBMS_OUTPUT.PUT_LINE('Job has completed') ;
DBMS_OUTPUT.PUT_LINE('Final job state = '||v_job_state) ;
DBMS_DATAPUMP.DETACH(v_dp_job_handle) ;
END ;But the application we have that uses the database cannot be changed to read from a CLOBWhy can't you change the application?
Well, anyway you should point out to your superiors that Oracle documented years ago to not use LONGS anymore...
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#sthref3806
It clearly states:
LONG Datatype
Note:
Do not create tables with LONG columns. Use LOB columns (CLOB, NCLOB) instead. LONG columns are supported only for backward compatibility.
Oracle also recommends that you convert existing LONG columns to LOB columns. LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases.
How do I go from CLOB to LONG?I'm sorry, cannot help you on that one, I don't think you can do that at all (Oracle wants us to stop using LONGS, so, it's a one-way conversion...):
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1037232794454#15512131314505
So: NO built_in, you'll need to write a program if the clob is ALWAYS LESS THAN 32k in size, you can use plsql..but is that the case in your case? Only you know that.
I believe that question is still unanswered on this forum, but you might try searchin for answers on this forum, and
the 'Database-General' forum: General Database Discussions
Perhaps you can google a Q&D workaround...
( And consider convincing your collegues to just convert your LONGS to LOBS)
Edited by: hoek on Apr 8, 2009 5:43 PM -
Urgent!!!----Update a field of Long data type via trigger
While it is obvious that it is no way for an Oracle trigger to update a field of a Long data type, is it a feasible way to call a java stored procedure from the trigger to achieve that purpose? If not, can you suggest any good solution to this?
Thanks so much.Scripter -
When you try to do a Set and Put, it is always good to explicitly set the statement's cursor type to something other than forward only, like keyset, and the lock type to something other than read-only. See if that helps...
Scott Richardson
National Instruments -
TIPS(63) : LONG DATA TYPE의 LENGTH 구하기
제품 : PL/SQL
작성날짜 : 1999-04-15
TIPS(63) : LONG DATA TYPE의 LENGTH 구하기
=========================================
PURPOSE
다음은 function 을 적용할 수 없는 long data type 의 length 를
구하는 방법을 소개한다.
Explanation
Long DataType 에 대해 Length 를 구하려 하는 경우 다음과 같은 Error 가 발생한다.
SQL> create table TOY
2 (Toy_ID NUMBER, Description LONG);
Table created.
SQL> select LENGTH(Description) from TOY;
select LENGTH(Description) from TOY
ERROR at line 1:
ORA-00932: inconsistent datatypes
"Inconsistent DataTypes" Error 는 LONG DataType 으로 정의된 Column 에
Function 을 적용하였기 때문에 발생한다.
VARCHAR2 Type 을 사용하면 정상 처리할 수 있으나, Oracle7 에서는 VARCHAR2 는
2,000 Characters 만 저장할 수 있으며, Oracle8 에서는 4,000 Characters 이다.
Oracle8 에서는 Long Data 를 저장하기 위해 LOB DataType 을 사용할 수 있으며,
LONG Data Type 은 Oracle7/Oracle8 모두 Support 되므로 LONG Type 에 대해
Length 를 확인하는 방법을 알아본다.
Example
다음은 anonymous PL/SQL Block 을 통해 TOY Table 에서 LONG Column 의
Length 를 구하는 Script 이다.
1. Single Record 에 대한 예
$ vi len_long.sql
declare
length_var NUMBER;
cursor TOY_CURSOR is
select * from TO;
toy_val TOY_CURSOR%ROWTYPE;
begin
open TOY_CURSOR;
fetch TOY_CURSOR into toy_val;
length_var := LENGTH(toy_val.Description);
DBMS_OUTPUT.PUT_LINE('Length of Description: '||length_var);
close TOY_CURSOR;
end;
SQL> set serveroutput on
SQL> @len_long
Length of description : 21
PL/SQL procedure successfully completed.
2. Multiple Record 에 대해서는 cursor FOR Loop 를 사용한다.
$ vi len_long.sql
declare
length_var NUMBER;
cursor TOY_CURSOR is
select * from TOY;
toy_val TOY_CURSOR%ROWTYPE;
begin
for toy_val in TOY_CURSOR loop
length_var := LENGTH(toy_val.Description);
DBMS_OUTPUT.PUT_LINE('ID: '||toy_val.Toy_ID);
DBMS_OUTPUT.PUT_LINE('Length of Description: '||length_var);
end loop;
end;
SQL> set serveroutput on
SQL> @len_long
ID: 1
Length of Description: 21
ID: 2
Length of Description: 27
PL/SQL procedure successfully completed.
Reference Document
------------------Hi Frank,
I have the exact same scenario where I have huge data coming from DB and its a must that I provide pagination.
I tried implementing as per the document but the pagination is not working for me too.
Details of the scenario:
1. I have a session facade method which takes a searchCriteria (custom criteria) as the input parameter and returns a list of entities.
a)This is the first method that I call as a default method activity in my taskflow.
b)The result of this method is dragged and dropped as table in the jsff. (*which created a methodIterator in pageDef unlike the documentation which has accessorIterator*).
2. I declared 2 class level variables
a) List<Entity> result: which is set once the method in the (1) above is executed.
b) long size: which is also set from the method (1) above.
3. I defined getEntityAll(int index,int range) method which returns List<Entity> as per the index and range using the result (class level variable populated by method in 1)
4. I defined getEntityAllSize() method which returns the size (class level variable populated by method in 1).
5. I created the datacontrol on top of the session facade bean.
6. I made sure to change the DataControlHandler = "oracle.adf.model.adapter.bean.DataFilterHandler"
7. I've set the rangeSize = 25 in my pagedef.
Now when I run my page, my default method activity calls the method in (1) above and populates the table, with a scroll bar.
Once I start scrolling, it calls my method in (1) but it does not call either of the methods (getEntityAll(int index,int range) & getEntityAllSize()) which adds the pagination behavior.
After this, my table has just 25 rows and further scrolling does not invoke any of the methods from the session bean.
I'm using jdev : JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923 (11.1.1.4.0).
Please let me know if I am missing anything.
Thanks in advance!
Swapna -
Create Tabel having LONG Data Type
HI Team,
I want to create table but for table i have 2 LONG data type is throwing error message please give the lightJustinCave wrote:
1) When you're getting an error, it's always helpful to include the error. Otherwise, we have to guess. And if we guess wrong, our answers will be incorrect and we'll waste everyone's time. Including the Oracle version is also useful.
2) Why, oh why would you want to use the LONG data type? That type has been depricated since 9.0.1. It was replaced by the CLOB data type (assuming you are storing large amounts of character data-- BLOB would be the replacement for LONG RAW columns). Data in a LONG is terribly difficult to work with in PL/SQL.
3) My recollection is that one of the (many, many, many) restrictions on a LONG is that you can only have 1 per table. I'm guessing that is the error you're getting (though if you post the error, I wouldn't have to guess).
Justin
Even oracle should probably re-consider its data dictionary views not to use long datatype.
e.g. Does not look perfect when you see LONG datatype for TEXT column in dba_views/all_views/user_views and that too in latest version Oracle 12c
Cheers,
Manik. -
Error in Primavera Analytics 3.1 (staretl issuing long data type error)
Hi,
While running ETL for Primavera Analytics 3.1 I am facing long data type error.
Detailed session log can be found on below URL.
http://pastebin.com/Ez0VihGN
I have following environment.
Primavera Analytics on Win2k8 64bit with 11g R2 DB.
Primavera EPPM DB on Sql Server
Connectivity through Oracle Gateway. (tested)
Please help.
Naeem Akhtar
Edited by: Naeem Akhtar Khan on Apr 9, 2013 3:58 AMBased on your post there is an error in you initdg4msl.ora file............ make sure you the database connection is correct and you add the two statement to the file
for example
Should be: HS_FDS_CONNECT_INFO=YOURSQLSERVER//YOUR DATABASE
Make sure you to add the following to the same file (see page 92):
HS_NLS_LENGTH_SEMANTICS=CHAR
HS_FDS_CHARACTER_SEMANTICS = TRUE
HS_KEEP_REMOTE_COLUMN_SIZE=ALL
Rerun the ETL process -
Help! Update a column in LONG data type
I am looking for help on how to update a column with the long data type in a oracle 7.34 table on sun Solaris 2.6.:
SQL> desc searchengine;
Name Null? Type
ENGINE_ID NOT NULL NUMBER(38)
ENGINEHTML LONG
SQL> set long 10000
Then when I run the following update statement I always get the error
ERROR at line 1:
ORA-01489: result of string concatenation is too long
Here is the update statement:
SQL> update searchengine set enginehtml = '<FORM ACTION="../ndClickMe/pgSearchEng" METHOD="GET" target=_top><TR><TD COLSPAN=2>
<IMG SRC=/gifs/start/looksmart_websearch.gif width=85 height=25 ALIGN=BOTTOM BORDER=0><BR>
</TD></TR><TR><TD HEIGHT=20 VALIGN=TOP COLSPAN=2><INPUT TYPE=hidden NAME=URL VALUE=http://www.looksmart.com/r_search>
<input type=hidden name=search value=0><input type=hidden name=comefrom value="izbx-search">
<input type=hidden name=isp value=zbx><INPUT NAME=key SIZE="22"><br><center>
<INPUT TYPE="IMAGE" SRC=/gifs/start/search.gif WIDTH=53 HEIGHT=15 ALIGN=BOTTOM border=0 NAME=search
value="Search!"><br></center></TD></TR></FORM><FORM name="Go3"><tr><td>
<SELECT name="select" onChange="dropDown(document.Go3.select.options[Go3.select.selectedIndex].value);">
<option value="">...or select a category</option>
<option value="http://www.looksmart.com/eus1/eus53930/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus53930" target=_top>Automotive</option>
<option value="http://www.looksmart.com/eus1/eus65300/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus65300" target=_top>Business</option>
<option value="http://www.looksmart.com/eus1/eus151538/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus151538" target=_top>Chat</option>
<option value="http://www.looksmart.com/eus1/eus53832/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus53832" target=_top>Computing</option>
<option value="http://www.looksmart.com/eus1/eus52213/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus52213" target=_top>Entertainment</option>
<option value="http://www.looksmart.com/eus1/eus53671/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus53671" target=_top>Family</option>
<option value="http://www.looksmart.com/eus1/eus53940/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus53940" target=_top>Health</option>
<option value="http://www.looksmart.com/eus1/eus141561/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus141561" target=_top>Hobbies</option>
<option value="http://www.looksmart.com/eus1/eus53706/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus53706" target=_top>Reference</option>
<option value="http://www.looksmart.com/eus1/eus74544/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus74544" target=_top>Shopping</option>
<option value="http://www.looksmart.com/eus1/eus51605/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus51605" target=_top>Society</option>
<option value="http://www.looksmart.com/eus1/eus62704/r?' | | '&' | | 'izbx' | | '&' | | 'comefrom=izbx-eus62704" target=_top>Sports</option>
<option value="http://www.looksmart.com/eus1/eus62920/r?' | | '&' & #0124; | 'izbx' | | '&' | | 'comefrom=izbx-eus62920" target=_top>Travel</option>
</select><hr noshade size="1"></td></tr></form>' where engine_id = 0;
Is there any way to resolve it?
Thanks,
JudyYes Prathap, I need to update a single column of type number in the search results table.but each of that column value would be updated with different values like one row in that column will take a value 325 while another will take 500 etc based on user input.
Your help in this is very much appreciated, Thanks in advance ! -
How can I retrieve a LONG data type using ADO
In VB I am using an ADODB object to retrieve data from an Oracle table that has a LONG data type column...
specifically: SELECT TRIGGER_BODY FROM USER_TRIGGERS WHERE TRIGGER_NAME = 'MYTRIGGER'
I have tried using the GETCHUNK method but it only returns the first 150 or so characters no matter how
many times I call it???? here is the sample code I'm using........
Dim Cn As ADODB.Connection, Rs As ADODB.Recordset, SQL As String
Dim sChunk() As Byte
Set Cn = New ADODB.Connection
Set Rs = New ADODB.Recordset
Cn.CursorLocation = adUseServer
Cn.Open "Provider=OraOLEDB.Oracle.1;Password=hrzadmin;Persist Security
Info=True;UserID=hadmin;Data Source=xxx.local"
SQL = "SELECT trigger_body from user_triggers where trigger_name = 'MYTRIGGER'"
Rs.Open SQL, Cn, adOpenStatic, adLockReadOnly
Debug.Print Rs!trigger_name
Debug.Print Rs!trigger_body
sChunk = rs.Fields("trigger_body").GetChunk(500)
Debug.Print sChunkI have a similar code which works for chunk size >400,
The image I am trying to retrieve is huge so the chunksize is also more.
Did you try with any non meta table?
For your reference I am pasting my application code below.
Hope it helps.
--Jagriti
Private Sub cmdGetImage_Click()
Dim bytchunk() As Byte 'variable to store binary data
Dim destinationFileNum As Integer 'variable for filenumber
'recordset for fetching Product Image for the product selected form the list
Dim recProductImage As New ADODB.Recordset
Dim offset As Long
Dim totalsize As Long
Dim roundTrips As Long
'variables used in calculation of time taken to fetch the image
Dim startTime As Currency, EndTime As Currency, time As Currency, Freq As Currency
Dim i As Integer 'counter variable
i = 0
On Error GoTo ErrorText 'redirect to error handler
'** Step 1 **'
'validating if product is selected from the list
If cboSelectProduct.Text = "" Then
MsgBox "Select product from the list!"
Exit Sub
End If
'** Step 2 **'
'validating if "optChunk" optionbox is selected then
'"txtChunksize" textbox should contain a value
If optchunk.Value = True Then
'validate if chunksize value is null
If txtChunkSize.Text = "" Then
MsgBox "Enter value for chunksize "
Exit Sub
End If
'validating that the chunk size entered should be a positive value
If CInt(txtChunkSize.Text) < 1 Then
MsgBox "ChunkSize value should be positive!"
Exit Sub
End If
End If
'** Step 3 **'
'open image column from product_information table using m_Oracon connection
recProductImage.Open "SELECT product_image FROM product_information " & _
" WHERE product_id =" & cboSelectProduct.ItemData(cboSelectProduct.ListIndex) _
, m_Oracon, adOpenStatic _
, adLockOptimistic, adCmdText
'check if product image exists for the product selected
If Not IsNull(recProductImage!product_image) Then
'setting mouse pointer on the form "frmChunkSize" to wait state
frmChunkSize.MousePointer = vbHourglass
'** Step 4 **'
'assigning "desitinationFileNum" variable to next file number
'available for use
destinationFileNum = FreeFile
'allocates a buffer for I/O to the temporary file "tempImage.bmp"
'at the current application path
Open App.Path & "\tempImage.bmp" For Binary As destinationFileNum
'** Step 5 **'
'Get the frequency of internal timer in Freq variable
QueryPerformanceFrequency Freq
'start the timer
QueryPerformanceCounter startTime
'clear "imgProduct" imagebox
imgProduct.Picture = LoadPicture("")
'** Step 6 **
If optValue.Value = True And optchunk.Value = False Then
'** Step 7 **
'using ADO Value property
bytchunk = recProductImage("product_image").Value
'appending byte arrary data to the temporary file
Put destinationFileNum, , bytchunk
'displaying "No. of Round Trips" in a label to 1
lblRoundTrips = 1
ElseIf optchunk.Value = True Then
'** Step 8 **
'converting the value entered "txtChunkSize" textbox to long
'and assigning it to chunksize variable
m_chunksize = CLng(txtChunkSize.Text)
'assigning the actual size of the image retrieved to a variable
totalsize = recProductImage("product_image").ActualSize
'calculating and assigning the "No. of Round Trips" to a variable
roundTrips = totalsize / m_chunksize
'in case fragment of data left, incrementing roundtrips by 1
If (totalsize Mod m_chunksize) > 0 Then
roundTrips = roundTrips + 1
End If
'In this loop the image is retrieved in terms of chunksize
'and appended to the temporary file
Do While offset < totalsize
'** Step 9 **
'retrieving product_image from the recordset, in chunks of bytes
bytchunk = recProductImage("product_image").GetChunk(m_chunksize)
offset = offset + m_chunksize
'appending byte arrary data to the temporary file
Put destinationFileNum, , bytchunk
Loop
'displaying "No. of Round Trips" in a label
lblRoundTrips = roundTrips
End If
'** Step 10 **'
'stop the timer after image retrieval is done
QueryPerformanceCounter EndTime
'close the opened file handle
Close destinationFileNum -
Oracle-specific data types vs Connection pool
Hi, using Oracle-specific data types such as
ArrayDescriptor and create it by a connection to an Oracle database from a WebSphere datasource throw a ClassCastException. There is no problem using these Oracle-specific data types when the connection is obtained via the DriverManager. WebSphere cannot fix the problem because these data types are
not part of the JDBC specification.
Some reply from Oracle?
Thank you very much.Thank you but I there is no solution in that thread.
Also, I know that WebLogic from BEA has a way around this issue... No Websphere work around ?
No Oracle fixing ?
Thanks.
Maybe you are looking for
-
Will somebody at Adobe please contact "Apple Care" and observe what REAL tech support is all about?
-
How can get my music from my mac 0S10 to my classic ipod?
How can I transfer my music from my MAC OS 10 to my classic ipod?
-
I've got a user who's having some odd issues, and I'm told other users in our organization see similar issues, oddly, intermittently, inexplicably, etc. My user has a MacBook Pro running 10.7.5 with an SCR331 reader and she had PKard 1.2 That was w
-
Characteristic 0BPARTNER is blocked by conversion
Hello, I´m trying to activate 0BPARTNER characteristic but it is blocked by conversion. System sais that problem will be solved activating 0BPARTNER but it is impossible to do it: Message no. R7476 Diagnosis The conversion of master data tables from
-
Script to navigate to next or previous document
Hi, since CC it's impossible to assign the shortcut CTRL-TAB to "next document" and CTRL-SHIFT-TAB to "previous document" what I found out is, that it is possible to assign these shortcuts to a script, so, if I had a script that go's to next document