setString(long pos, java.lang.String str, int offset, int len) - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantage™

Appends all or part of the given string to the end of the CLOB value that this Clob object represents and returns the number of characters written.

If successful, setString() returns the number of characters appended.

Syntax

setString(long pos, java.lang.String str, int offset, int len)

Syntax Elements

pos
Reserved for future use.
str
The string to append to the CLOB value that this Clob object represents.
offset
The offset into the str argument at which to start reading the characters to append.
len
The number of characters from the str argument to append to the CLOB value.

Exceptions

IF … THEN setString() throws an SQLException to …
there is an error accessing the Clob value indicate a failure while writing data into a LOB, setting the SQLException fields as follows:
  • SQLState Field = “TS000”
  • vendorCode Field = 7852
the JVM cannot allocate enough memory for the method to write the string to the Clob indicate that available JVM heap memory has run out, setting the SQLException fields as follows:
  • SQLState Field = “TS000”
  • vendorCode Field = 7856
one of the following:
  • the str argument is null
  • the value of the offset argument is negative
  • the value of the len argument is negative
  • the value of the pos argument is less than 1
  • the value of offset + len is larger than the length of the str argument
indicate that a Java external routine called a Blob or Clob method with an invalid argument, setting the SQLException fields as follows:
  • SQLState Field = “22023”
  • vendorCode Field = 7859