Unable to retrieve MetaData Information while connecting to AS 200
This is part of my code...It works in case of when i connect to AS 2000 server.
PPDSCHECK( m_pIDBCreateCommand->QueryInterface(IID_IDBSchemaRowset,(void **)
&m_pIDBSchemaRowset));
C2W_STRCPY( pWcatalog_name , "FoodMart 2000", 14);
prestrict.pRgRestrictions[0].bstrVal = SysAllocString( pWcatalog_name );
prestrict.pRgRestrictions[0].vt = VT_BSTR;
assert(prestrict.pRgRestrictions[0].bstrVal);
prestrict.cRestrictions = 3;
PPDSCHECK(m_pIDBSchemaRowset->GetRowset(
NULL , // pUnkOuter
MDSCHEMA_MEMBERS , // guidSchema
prestrict.cRestrictions , // cRestrictions
prestrict.pRgRestrictions , // rgRestrictions[]
IID_IRowset , // IID for resultant rowset
0 , // cProperties
NULL , // rgProperties
(IUnknown **) &m_pIRowset) ); // ppIRowset
ULONG cRowsObtained;
HROW *rghRows = NULL;
HRESULT hr2 =
m_pIRowset->GetNextRows(NULL,0,NUMROWS_CHUNK,&cRowsObtained,& rghRows );
This is basically in the connect function where i do
m_pIDBInitialize->Initialize() and call other routines. In case of AS 2000,
cRowsObtained comes 64 whereas in case of AS 2005 it comes 0. I have the
FoodMart 2000 Database present in both servers.
Any suggestions are welcome.
|