Home » Developer & Programmer » Precompilers, OCI & OCCI » toText function fails if mask is bigger than 14 chars
icon9.gif  toText function fails if mask is bigger than 14 chars [message #190399] Wed, 30 August 2006 09:09 Go to next message
roman745@poczta.onet.pl
Messages: 2
Registered: August 2006
Location: dfas
Junior Member
toText function fails if mask is bigger than 14 chars.
How to overcome this problem


when number is bigger then 14 chars it fails


//////////////////////////////////////////////////////////
#include <iostream>
#include "occi.h"
using namespace oracle::occi;
using namespace std;
int sql_Oracle_Select_x(int yyy)
{
Environment *env;
Connection *conn;
Number p5;
string tt44;
env = Environment::createEnvironment (Environment::DEFAULT);
const string &fmt_num = "99999999999.9999";
p5 = 11666333555.6655;
tt44 = p5.toText(env, fmt_num);
Environment::terminateEnvironment (env);
return 0;
}
////////////////////////////////////////////////////////////

simular problem is with
//Timestamp dd = rset->getTimestamp(4);
//string tt55=dd.toText("yyyy-mm-dd hh24:mi:ss",0); FAILS
//string tt55=dd.toText("yyyy-mm-dd hh",0); IS OK

thanks for help

Re: toText function fails if mask is bigger than 14 chars [message #190569 is a reply to message #190399] Thu, 31 August 2006 05:09 Go to previous message
roman745@poczta.onet.pl
Messages: 2
Registered: August 2006
Location: dfas
Junior Member
I am answering to myself
The problem is in dealocating pointers in 'Debug Mode' (VC++ .NET v.7.1)

in file: vc7\include\xmemory
void deallocate(pointer _Ptr, size_type)
{ // deallocate object at _Ptr, ignore size
operator delete(_Ptr); // fails
}

so in 'Release Mode everythink is OK
Previous Topic: Significant Digits
Next Topic: OCI changes from 9 to 10?
Goto Forum:
  


Current Time: Thu Nov 21 11:42:50 CST 2024