Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Convert to UCS-2 .. Pin
rasha200310-May-04 5:09
rasha200310-May-04 5:09 
Generalabout allocator Pin
vividtang8-May-04 21:16
vividtang8-May-04 21:16 
GeneralRe: about allocator Pin
toxcct9-May-04 5:54
toxcct9-May-04 5:54 
GeneralNewbie string question Pin
MikeUofPhx8-May-04 17:00
MikeUofPhx8-May-04 17:00 
GeneralRe: Newbie string question Pin
Anonymous8-May-04 20:27
Anonymous8-May-04 20:27 
GeneralRe: Newbie string question Pin
John R. Shaw8-May-04 22:13
John R. Shaw8-May-04 22:13 
GeneralRe: Newbie string question Pin
MikeUofPhx9-May-04 13:41
MikeUofPhx9-May-04 13:41 
GeneralOLE DB 'IColumnsInfo2' problem Pin
KalliMan8-May-04 13:06
KalliMan8-May-04 13:06 
Hello.
I'm writting application which Open an Access database via OLE DB.
And I want to receave all column metadata With 'IColumnsInfo2::GetRestrictedColumnInfo(...)' , but I cannot(or don't know how) implement IColumnsInfo2 with 'IColumnsRowset'.
i.e.
--------------------------------
IColumnsRowset** ppOLEColumnsInfo;
IColumnsInfo2** ppOLEColumnsInfo2;
.............
HRESULT hr = ppOLEColumnsInfo->QueryInterface(IID_IColumnsInfo2,(void**)ppOLEColumnsInfo2)
//and hr == E_NOINTERFACE
--------------------------------
............
If i try to add 'DBPROP_IColumnsInfo2' property while open 'IColumnRrcorset' with 'IOpenRowset::OpenRowset', result is 'DB_S_ERRORSOCCURRED'.
i.e.
--------------------------------
IOpenRowset** ppOLEOpenRowset;
IColumnsRowset** ppOLEColumnsInfo;
..........

DBPROPSET dbPropSet[1];
ULONG cDbPropCount = sizeof(dbPropSet)/sizeof DBPROPSET;

const ULONG cProperties = 1;
DBPROP rgProperties[cProperties];

pPropSet->rgProperties = rgProperties;
pPropSet->cProperties = cProperties;
pPropSet->guidPropertySet = DBPROPSET_ROWSET;

AddProperty(&rgProperties[1] ,DBPROP_IColumnsInfo2,VT_BOOL,VARIANT_TRUE,DBPROPOPTIONS_OPTIONAL);//doesn't work with DBPROPOPTIONS_REQUIRED, too
............
hr = pOLEOpenRowset->OpenRowset(NULL,&dbID,NULL,IID_IColumnsRowset,
1 ,&dbPropSet,(IUnknown **)&pOLEColumnsRowset );

//and hr == DB_S_ERRORSOCCURRED
//and dbPropSet.rgProperties.dwStatus == DBPROPSTATUS_NOTSUPPORTED
--------------------------------
So, how can i implement Rowset which can implement IDBColumnInfo2 ?

thanks at advice:
KalliMan



a
QuestionWhich of these methods is more efficient? Pin
Joe Smith IX8-May-04 12:48
Joe Smith IX8-May-04 12:48 
AnswerRe: Which of these methods is more efficient? Pin
Gary R. Wheeler8-May-04 13:39
Gary R. Wheeler8-May-04 13:39 
AnswerRe: Which of these methods is more efficient? Pin
Prakash Nadar8-May-04 22:35
Prakash Nadar8-May-04 22:35 
AnswerRe: Which of these methods is more efficient? Pin
Paul Ranson9-May-04 1:15
Paul Ranson9-May-04 1:15 
AnswerRe: Which of these methods is more efficient? Pin
Ravi Bhavnani9-May-04 4:29
professionalRavi Bhavnani9-May-04 4:29 
AnswerRe: Which of these methods is more efficient? Pin
Joe Woodbury9-May-04 7:59
professionalJoe Woodbury9-May-04 7:59 
GeneralRe: Which of these methods is more efficient? Pin
Tim Smith9-May-04 9:23
Tim Smith9-May-04 9:23 
GeneralRe: Which of these methods is more efficient? Pin
Joe Woodbury9-May-04 9:42
professionalJoe Woodbury9-May-04 9:42 
GeneralRe: Which of these methods is more efficient? Pin
Tim Smith9-May-04 13:47
Tim Smith9-May-04 13:47 
AnswerRe: Which of these methods is more efficient? Pin
Tim Smith9-May-04 9:27
Tim Smith9-May-04 9:27 
GeneralUsing MFC Source Code Question Pin
nm_1148-May-04 8:26
nm_1148-May-04 8:26 
GeneralRe: Using MFC Source Code Question Pin
Joe Woodbury8-May-04 8:41
professionalJoe Woodbury8-May-04 8:41 
GeneralRPC: Problem in sending data Pin
ahsan_a8-May-04 8:17
ahsan_a8-May-04 8:17 
GeneralRe: RPC: Problem in sending data Pin
ahsan_a8-May-04 12:03
ahsan_a8-May-04 12:03 
GeneralRe: RPC: Problem in sending data Pin
Gary R. Wheeler8-May-04 13:42
Gary R. Wheeler8-May-04 13:42 
QuestionAccess WindowProc in MFC? Pin
Anonymous8-May-04 7:04
Anonymous8-May-04 7:04 
GeneralVoid Pin
soul.ripper8-May-04 7:03
soul.ripper8-May-04 7:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.