mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Oracle: Oci8 patch to support BLOBS/CLOBS in 64-bit platforms (thanks wqcmaster)
git-svn-id: svn://ultimatepp.org/upp/trunk@6906 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d92fe859d3
commit
a8d842fe6e
1 changed files with 35 additions and 0 deletions
|
|
@ -818,6 +818,23 @@ void OCI8Connection::GetColumn(int i, String& s) const {
|
|||
}
|
||||
const Item& c = column[i];
|
||||
if(c.type == SQLT_BLOB || c.type == SQLT_CLOB) {
|
||||
if (sizeof(int) < sizeof(uintptr_t)){ // CPU_64
|
||||
int64 handle;
|
||||
GetColumn(i, handle);
|
||||
if(!IsNull(handle)) {
|
||||
if(c.type == SQLT_CLOB && session->utf8_session) {
|
||||
OracleClob clob(*session, handle);
|
||||
s = FromUnicode(clob.Read());
|
||||
}
|
||||
else {
|
||||
OracleBlob blob(*session, handle);
|
||||
s = LoadStream(blob);
|
||||
}
|
||||
}
|
||||
else
|
||||
s = Null;
|
||||
return;
|
||||
}
|
||||
int handle;
|
||||
GetColumn(i, handle);
|
||||
if(!IsNull(handle)) {
|
||||
|
|
@ -851,6 +868,24 @@ void OCI8Connection::GetColumn(int i, WString& ws) const {
|
|||
}
|
||||
const Item& c = column[i];
|
||||
if(c.type == SQLT_BLOB || c.type == SQLT_CLOB) {
|
||||
if (sizeof(int) < sizeof(uintptr_t)){ // CPU_64
|
||||
int64 handle;
|
||||
GetColumn(i, handle);
|
||||
if(!IsNull(handle)) {
|
||||
if(session->utf8_session && c.type == SQLT_CLOB) {
|
||||
OracleClob clob(*session, handle);
|
||||
ws = clob.Read();
|
||||
}
|
||||
else {
|
||||
OracleBlob blob(*session, handle);
|
||||
String s = LoadStream(blob);
|
||||
ws = s.ToWString();
|
||||
}
|
||||
}
|
||||
else
|
||||
ws = Null;
|
||||
return;
|
||||
}
|
||||
int handle;
|
||||
GetColumn(i, handle);
|
||||
if(!IsNull(handle)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue