[odb-users] Inserting CLOB greater having size greater then 12288

roberto minarelli roberto.minarelli.de at gmail.com
Thu Dec 21 10:39:46 EST 2023


Hi,
I've already searched all the archive but I could not find anything
I am trying to inserting a  in a column specified as CLOB more than 12288
chars, that appears to be the actual limit

I am using the odb version 2.5.0-b.23 on OS OL 8.7 having g++ version 8.5.0

the class is as follows:

#pragma db value
class PamExchangeId
{
#pragma db column("UUID") type("VARCHAR2(40)")
std::string strUUID;
#pragma db column("OPERATION_TYPE")
unsigned short usOperationType;

friend class odb::access;
public:
PamExchangeId(std::string uuid="", unsigned short operation=0)
{
strUUID=uuid;
usOperationType=operation;
}
virtual ~PamExchangeId(){}

std::string getUUID()const {return strUUID;}
unsigned short getOperationType() const {return usOperationType;}

void setUUID(const std::string& value) {strUUID=value;}
void setOperationType(unsigned short value) {usOperationType=value;}

bool operator<(const PamExchangeId key) const
{
return strUUID.compare(key.getUUID()) <0 ||
(strUUID.compare(key.getUUID()) == 0 && usOperationType <
key.getOperationType());
}
};

#pragma db object table("MPVR_DBA.VR_SDG_PAM_EXCHANGE")
class VRSdgPamExchange
{
#pragma db id column("")
PamExchangeId Id;
#pragma db type("CLOB") column ("SDG_PAM_JSON_REQUEST")
std::string strSdgPamJsonRequest;
#pragma db type("CLOB") column ("SDG_PAM_JSON_RESPONSE")
std::string strSdgPamJsonResponse;
#pragma db column ("MILLIS")
unsigned long ulMillis;
#pragma db column ("LAST_UPDATE") type("DATE")
std::string strLastUpdate;

#pragma db index ("PK_VR_SDG_PAM_EXCHANGE") unique members(Id)

friend class odb::access;

public:
VRSdgPamExchange(){}
virtual ~VRSdgPamExchange() {}



void setId(PamExchangeId& value) {Id=value;}
void setSdgPamJsonRequest(const std::string& value)
{strSdgPamJsonRequest=value;}
void setSdgPamJsonResponse(const std::string&
value){strSdgPamJsonResponse=value;}
void setMillis(const unsigned long value) {ulMillis=value;}
void setLastUpdate(const std::string& value) {strLastUpdate=value;}

PamExchangeId getId() const {return Id;}
std::string getSdgPamJsonRequest() const {return strSdgPamJsonRequest;}
std::string getSdgPamJsonResponse() const {return strSdgPamJsonResponse;}
unsigned long getMillis() const {return ulMillis;}
std::string getLastUpdate() const {return strLastUpdate;}
};

The error returned is
ORA-01461: can bind a LONG value only for insert into a LONG column

may you give me a hint on how to proceed? As I mentioned before, I didn't
find anything in the documentation or in the archive

Thanks a lot
Best Regards!

Roberto Minarelli Della Valle


More information about the odb-users mailing list