Solved

ActiveX  ADO Shape WTL

Posted on 2002-04-22
13
268 Views
Last Modified: 2013-11-25
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(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






0
Comment
Question by:ValentinRozescu
  • 6
  • 4
  • 2
  • +1
13 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 6961267
I can't tell from the code... What data do you want to be in rsLevel2?


In general, you will need to Open a recordset, passing in a table name or other SQL SELECT statement.

-- Dan
0
 
LVL 1

Author Comment

by:ValentinRozescu
ID: 6962028
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
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6962165
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
0
 
LVL 1

Author Comment

by:ValentinRozescu
ID: 6962179
i use this and it worked:
rsLeve2=CComQIPtr<ADORecordset>(vValue.pdispVal);

thanks for all the comments
0
 
LVL 11

Expert Comment

by:griessh
ID: 7122141
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
0
 
LVL 1

Author Comment

by:ValentinRozescu
ID: 7123881
hi griessh
what can I do now?
no one answer to my question exept myself
how can I close the question?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 11

Expert Comment

by:griessh
ID: 7124449
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
0
 
LVL 1

Author Comment

by:ValentinRozescu
ID: 7124474
hmmm... of course i care
EE is a valuable resource for me.
what do you mean by 'refund my points'?
0
 
LVL 11

Expert Comment

by:griessh
ID: 7124539
"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
0
 
LVL 1

Author Comment

by:ValentinRozescu
ID: 7124583
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."

0
 
LVL 11

Expert Comment

by:griessh
ID: 7128245
As I said already ... just wait those 7 days, they will give your points back.
0
 
LVL 1

Author Comment

by:ValentinRozescu
ID: 7129123
ok
thanks again
0
 
LVL 6

Accepted Solution

by:
Mindphaser earned 200 total points
ID: 7138074
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Socket Programming (Unix) 8 119
Better understanding on C++ Class serialization and formats 9 60
How do ASP.NET and MVC work together? 4 28
SSRS troubles 4 20
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now