Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Samples/Win7Samples/dataaccess/oledb/rowsetviewer/crowset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,12 @@ HRESULT CDataAccess::GetColumnData(const DBBINDING* pBinding, void* pData, DBSTA
//(ie: DBTYPE_WSTR = "130". So we need to convert the string to an int, then to
//the actual assoicated mapped type name (for ease of viewing without having to
//have the header handy when viewing schemas).
DBTYPE wSchemaType;
if(ConvertToLONG(pwszValue, (LONG*)&wSchemaType, 0/*Min*/, LONG_MAX, 0/*Base*/))
LONG lSchemaType; /* it will be set with DBTYPE (USHORT) value */
if(ConvertToLONG(pwszValue, &lSchemaType, 0/*Min*/, USHRT_MAX, 0/*Base*/))
{
//NOTE: on failure we have no choice to leave the column as the original
//returned integer.
StringCopy(pwszValue, GetDBTypeName(wSchemaType), ulMaxSize);
StringCopy(pwszValue, GetDBTypeName((DBTYPE)lSchemaType), ulMaxSize);
}
}
}
Expand Down