mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -06:00
MSSQL - DBTYPE_BYREF does not seem to work well - putting it back to previous handling (but keeping BLOB handling)
git-svn-id: svn://ultimatepp.org/upp/trunk@700 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
845c4f3bbf
commit
edc6204fa0
1 changed files with 21 additions and 9 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
NAMESPACE_UPP
|
||||
|
||||
#define BYREF
|
||||
// #define BYREF // This was not success, maybe later?
|
||||
|
||||
#define LTIMING(x) // RTIMING(x)
|
||||
|
||||
|
|
@ -372,14 +372,26 @@ static Buffer<DBBINDING> GetRowDataBindings(const DBCOLUMNINFO *col, int count,
|
|||
|
||||
#else
|
||||
case DBTYPE_BYTES:
|
||||
db->wType = DBTYPE_BYTES;
|
||||
db->obValue = rowbytes;
|
||||
*ob = &DBOutString;
|
||||
db->cbMaxLen = min<int>(col->ulColumnSize, 10000000);
|
||||
rowbytes += (db->cbMaxLen + 1 + 3) & -4;
|
||||
db->obLength = rowbytes;
|
||||
db->dwPart = DBPART_VALUE | DBPART_LENGTH | DBPART_STATUS;
|
||||
rowbytes += sizeof(DBLENGTH);
|
||||
if(col->dwFlags & DBCOLUMNFLAGS_ISLONG) {
|
||||
db->wType = DBTYPE_IUNKNOWN;
|
||||
db->cbMaxLen = sizeof(ISequentialStream*);
|
||||
db->pObject = &object.Add();
|
||||
db->pObject->iid = IID_ISequentialStream;
|
||||
db->pObject->dwFlags = STGM_READ;
|
||||
db->obValue = rowbytes;
|
||||
rowbytes += sizeof(ISequentialStream*);
|
||||
*ob = &DBOutBytes;
|
||||
}
|
||||
else {
|
||||
db->wType = DBTYPE_BYTES;
|
||||
db->obValue = rowbytes;
|
||||
*ob = &DBOutString;
|
||||
db->cbMaxLen = min<int>(col->ulColumnSize, 10000000);
|
||||
rowbytes += (db->cbMaxLen + 1 + 3) & -4;
|
||||
db->obLength = rowbytes;
|
||||
db->dwPart = DBPART_VALUE | DBPART_LENGTH | DBPART_STATUS;
|
||||
rowbytes += sizeof(DBLENGTH);
|
||||
}
|
||||
break;
|
||||
|
||||
case DBTYPE_STR:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue