Processing Results from Select where columns type is [uniqueidentifier] - Using OleDB

I've got an application that parses a result set of a stored procedure, while debugging I noticed that the value of one of my variables was funky, upon inspection I noticed that the DB's type for this column is [uniqueidentifier]. I'm assuming this is a GUID as far as c++ is concerned. We use a wrapper for the OleDB interface, so this might be the limiting factor (and I may need to address this there), but I was wondering if I give the code where this process takes place maybe I don't need to touch the wrapper at all. I have access to all of boost.

Note: ManagedBlob is part of the wrapper for the stored procedures, I can get column info (if needed from the object) and the actual data for each column returned.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void CheckVersionStoredProc::MakeObject(SyncToken& container, const ManagedBlob &blob)
{
   m_gotResults = true;
   std::string temp;
   size_t index = 0;
   temp.assign(&(blob.GetElement<char>(index)), blob.GetElementLength(index));
   Resize(temp);
   container.Version = temp;
   ++index;		
   
   temp.assign(&(blob.GetElement<GUID>(index)), blob.GetElementLength(index));
   Resize(temp);
   container.Guid = temp;
   ++index;
}
Topic archived. No new replies allowed.