|
-
April 22nd, 2002, 06:07 AM
#1
WTL + ADO + Shape
hi
i have a problem, a big one
i build an active x control that receive from a vb programm a shape recordset
like this
STDMETHODIMP CXGrid: utref_DataSource(IDispatch *newVal)
{
long i;
BSTR bstrColumnTitle;
CString sColumnTitle;
DataTypeEnum pDT;
m_rsDataSource=CComQIPtr< ADORecordset >( newVal);
CComPtr<ADORecordset> rsLevel2;
ADOFields* pFields;
ADOField* pField;
m_rsDataSource->get_Fields (&pFields);
long count;
pFields->get_Count (&count);
for(i=0;i<count;i++)
{
pFields->get_Item(CComVariant((long)i),&pField);
pField->get_Name(&bstrColumnTitle);
pField->get_Type(&pDT);
if(pDT==adChapter)
{
// rsLeve2=CComPtr<ADORecordset>(pField);
}
else
{
sColumnTitle=bstrColumnTitle;
InsertColumn(i,bstrColumnTitle,0,200);
}
}
return S_OK;
}
i need to know how to load rsLevel2 with the child recordset provided by the shape conection
thank you in advance for your help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|