Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 1st, 2005, 06:37 AM
tvc3mye's Avatar
tvc3mye tvc3mye is offline
Daniel Schildsky
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2004
Location: KL, Malaysia.
Posts: 675 tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level)tvc3mye User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 6 Days 19 h 3 m 10 sec
Reputation Power: 201
Send a message via ICQ to tvc3mye Send a message via MSN to tvc3mye Send a message via Yahoo to tvc3mye
2 VARCHAR2(4000) fields problem

Hi all,

I have a table containing 2 fields defined with VARCHAR2(4000) to store up to 4000 characters. I also have another table containing similar field with the same VARCHAR2(4000) data type defined.
There is also a web-based application written in java using JDBC oracle thin client driver. The sql statements in the applications are formed using prepareStatements to bind the values and fieldnames dynamically at run-time.

When I perform a test by running update transaction in the front end (which is a webpage from a web-based application written in java) that is supposed to update 3 large-sized data chunks (4000 english characters) into all three fields, the latter succeeded but the the attempt to insert into the table with 2 VARCHAR2(4000) fields failed and the oracle threw an exception
Code:
ORA-01461: can bind a LONG value only for insert into a LONG column


There isn't any fields in the database table defined as LONG date type. I was puzzled....what could have gone wrong? I've checked the source codes and non of the codes mentioned anything about binding the java.lang.String data type to Oracle's LONG data type..

I'm using Oracle 9i. Although this version of Oracle supports BLOB and CLOB data types, I cannot convert the fields into these types because of other technical constraints brought about by other software components working together with this application.

Could it be the Oracle thin driver has performed an implicit conversion over the large-sized character data (4000 characters)?
__________________
When the programming world turns decent, the real world will turn upside down.

Reply With Quote
  #2  
Old July 2nd, 2005, 01:39 AM
Ach Ach is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 46 Ach User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 36 m 29 sec
Reputation Power: 5
Hi,
You can try your hypothesis ! create a table with just on column varcahr2(40) and then try to use your source for updating that column.You will know if your problem is because of Large amount of caparity in varchar or is a general fault of jdbc driver in converting datatypes.
Sorry I have no jdbc driver to do this!

Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsDatabasesOracle Development > 2 VARCHAR2(4000) fields problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT