ValentinRozescu
asked on
ActiveX ADO Shape WTL
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::putref_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(CComVari ant((long) i),&pField ); pField->get_Name(&bstrColu mnTitle);
pField->get_Type(&pDT);
if(pDT==adChapter)
{
// rsLeve2=CComPtr<ADORecords et>(pField );
}
else
{
sColumnTitle=bstrColumnTit le;
InsertColumn(i,bstrColumnT itle,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
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::putref_DataSource(
long i;
BSTR bstrColumnTitle;
CString sColumnTitle;
DataTypeEnum pDT;
m_rsDataSource=CComQIPtr< ADORecordset >( newVal);
CComPtr<ADORecordset> rsLevel2;
ADOFields* pFields;
ADOField* pField;
m_rsDataSource->get_Fields
long count;
pFields->get_Count (&count);
for(i=0;i<count;i++)
{
pFields->get_Item(CComVari
pField->get_Type(&pDT);
if(pDT==adChapter)
{
// rsLeve2=CComPtr<ADORecords
}
else
{
sColumnTitle=bstrColumnTit
InsertColumn(i,bstrColumnT
}
}
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
ASKER
my recordset is open and I can 'browse' it
my problem is that I can't read the child recordset from the data shape provider
my problem is that I can't read the child recordset from the data shape provider
I don't see anywhere that you try to access the data or do a MoveNext or other data access operations.
>>I can't read the child recordset from the data shape provider
I don't know what the child recordset is.
-- Dan
>>I can't read the child recordset from the data shape provider
I don't know what the child recordset is.
-- Dan
ASKER
i use this and it worked:
rsLeve2=CComQIPtr<ADORecor dset>(vVal ue.pdispVa l);
thanks for all the comments
rsLeve2=CComQIPtr<ADORecor
thanks for all the comments
Dear ValentinRozescu
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity, I will suggest to
"refund the points and PAQ at zero points"
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity, I will suggest to
"refund the points and PAQ at zero points"
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
ASKER
hi griessh
what can I do now?
no one answer to my question exept myself
how can I close the question?
what can I do now?
no one answer to my question exept myself
how can I close the question?
Valentin
First of all thanks for coming back! That just shows ud that you care.
It sounds like you wouldn't have a problem with closing this question. I think Dan gave some valuable advice worth to be kept around and you offered your own solution. Therefore I suggested to refund your points. Just wait those 7 days and one of the moderators will probably follow my recommendation ...
======
Werner
First of all thanks for coming back! That just shows ud that you care.
It sounds like you wouldn't have a problem with closing this question. I think Dan gave some valuable advice worth to be kept around and you offered your own solution. Therefore I suggested to refund your points. Just wait those 7 days and one of the moderators will probably follow my recommendation ...
======
Werner
ASKER
hmmm... of course i care
EE is a valuable resource for me.
what do you mean by 'refund my points'?
EE is a valuable resource for me.
what do you mean by 'refund my points'?
"Refund"? If you don't get an answer, you will get the points back you offered. Right now they are in a kind of account used to 'pay' the experts. Since you don't have to pay anybody, you'll get them back!
=======
Werner
=======
Werner
ASKER
good idea
but, how can i do that?
if i put 0 in "1. Increase points to: " edit box i rceive, obviously: "You cannot decrease the value of a question once posted."
but, how can i do that?
if i put 0 in "1. Increase points to: " edit box i rceive, obviously: "You cannot decrease the value of a question once posted."
As I said already ... just wait those 7 days, they will give your points back.
ASKER
ok
thanks again
thanks again
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In general, you will need to Open a recordset, passing in a table name or other SQL SELECT statement.
-- Dan