• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Can not insert two long data into table with two varchar2 dataType column!

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Table Test(
text1 varchar2(4000),
text2 varchar2(4000)
);
Two test case using Pro*c for 8i, Databse code is JA16EUC:
Case1: (EXEC SQL DECLARE)
char text1[2000];
char text2[2000];
Running under Windows is ok,
but under Solaris, error code: ORA-01461 can bind a LONG value only for insert into a LONG column
Case2: (EXEC SQL DECLARE)
char text1[1333];
char text2[1333];
Test result is ok.

Case3: (EXEC SQL DECLARE)
char text1[4000];
char text1[1000];
Test result is ok.
Thanks for your help!
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know one thing you cannot have more than one long field in a table in Oracle.
OK I see you question wasn't along those lines.
Can you do a Substr on the long field to make it the size of the varchar2, or one less char, that might make it allow the entry.

Mark
[ November 13, 2002: Message edited by: Mark Spritzler ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic