Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Treeview linked to a external DW and COM

3 posts in Objects Last posting was on 2002-11-25 15:17:57.0Z
None Posted on 2002-11-24 18:38:05.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "None" <tbrackney@kc.rr.com>
Subject: Treeview linked to a external DW and COM
Date: Sun, 24 Nov 2002 10:38:05 -0800
Lines: 11
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: mkc-65-26-8-203.kc.rr.com 65.26.8.203
Message-ID: <364_CtPW#o9kCHA.161@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:744
Article PK: 713310

I am planning to build a treeview which will be populated from a COM object
which does all the database query. I need to make the calls to com and get
the data then populate the treeview. In addition the details of that
particular item needs to be displayed in a DW on the left. The user would be
able to make an update and then that information would be passed back by way
of a method in the COM. Has anyone every tried this before or does this
sound possible? How difficult do you think it might be? Thanks in advance
for your input.
Tom


Adrian Gomez Posted on 2002-11-24 17:24:38.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Adrian Gomez" <adriancgomez@hotmail.com>
Subject: Re: Treeview linked to a external DW and COM
Date: Sun, 24 Nov 2002 14:24:38 -0300
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: host50.200-43-40.telecom.net.ar 200.43.40.50
Message-ID: <364_DbvEoC#kCHA.198@forums.sybase.com>
References: <364_CtPW#o9kCHA.161@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:743
Article PK: 713309

I don´t see it much difficult. You just have to take a look at how
ResultSets work. In the client App you can manage data using DataStores, and
when you need to send them to your COM object, convert them into a
ResultSet.
When you need to load data from the COM component, return them as ResultSet
and in PB convert them to DataStore.

I am currently working on an App that does so and I am not having much
troubles.

Good Luck
Adrian

"None" <tbrackney@kc.rr.com> wrote in message
news:CtPW#o9kCHA.161@forums.sybase.com...
> I am planning to build a treeview which will be populated from a COM
object
> which does all the database query. I need to make the calls to com and get
> the data then populate the treeview. In addition the details of that
> particular item needs to be displayed in a DW on the left. The user would
be
> able to make an update and then that information would be passed back by
way
> of a method in the COM. Has anyone every tried this before or does this
> sound possible? How difficult do you think it might be? Thanks in advance
> for your input.
> Tom
>
>


None Posted on 2002-11-25 15:17:57.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "None" <tbrackney@kc.rr.com>
Subject: Re: Treeview linked to a external DW and COM
Date: Mon, 25 Nov 2002 07:17:57 -0800
Lines: 87
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: mkc-65-26-8-203.kc.rr.com 65.26.8.203
Message-ID: <364_EMsu0dIlCHA.155@forums.sybase.com>
References: <364_CtPW#o9kCHA.161@forums.sybase.com> <364_DbvEoC#kCHA.198@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:742
Article PK: 713313

Thanks for the reply. I have another question. The COM object will be
accessed by way of a method. This method returns to me the data in a
collection. This method in the com actually builds the parent/child
relationships for each root item in the first collection. So for example. I
call the GetRootSecurityItem Method in the Application Class in the COM.
This returns a collection of SecurityItem class of all the root items. Then
to get the children I call the children method in the Securityitem Class if
there are children. That is another method which I to check to see if I need
to get children in the first place. So let me set this up further.

Let assume I have created the OLEObjects for the COM for all the Classes in
the COM. There are 4.

Get the roots of the tree or the parents
collFF_SecurityItem = FF_Application.GetRootSecurityItems
//How many parents are there
li_rows = collFF_SecurityItem.Count
// Add each item to the TreeView
For li_Cnt = 1 To li_rows
// Call a function to set the values of the TreeView item from the
OleObject data
of_set_item(li_Level, li_Cnt, itvi_New)
of_GetChildren(li_cnt, li_level) // Lets get the children now
NEXT

IF FF_SecurityItem.HasChildren.item[al_parent] = TRUE THEN
collFF_ChildrenSecItems = FF_SecurityItem.Children
li_rows =coll FF_ChildrenSecItems.Count
FOR i = 1 To li_rows
Code to populate the tree.....
of_getChildren(al_parent, li_level)
NEXT
END IF

So I have recursive call to get all the children. Unfortantly everything is
returned to be in VB collection objects.
So I think I have to create an object just to deal with each collection.

So do you think I can use the ResultSet for this then populate a datastore
then deal with the treeview in the traditional sense that I have seen with
treeviews? Do you think it makes since to get all the data that there is
going to be and throw it into a datastore or datastores then work from
there?

thanks a bunch for your help.
Tom

"Adrian Gomez" <adriancgomez@hotmail.com> wrote in message
news:DbvEoC#kCHA.198@forums.sybase.com...
> I don´t see it much difficult. You just have to take a look at how
> ResultSets work. In the client App you can manage data using DataStores,
and
> when you need to send them to your COM object, convert them into a
> ResultSet.
> When you need to load data from the COM component, return them as
ResultSet
> and in PB convert them to DataStore.
>
> I am currently working on an App that does so and I am not having much
> troubles.
>
> Good Luck
> Adrian
>
> "None" <tbrackney@kc.rr.com> wrote in message
> news:CtPW#o9kCHA.161@forums.sybase.com...
> > I am planning to build a treeview which will be populated from a COM
> object
> > which does all the database query. I need to make the calls to com and
get
> > the data then populate the treeview. In addition the details of that
> > particular item needs to be displayed in a DW on the left. The user
would
> be
> > able to make an update and then that information would be passed back by
> way
> > of a method in the COM. Has anyone every tried this before or does this
> > sound possible? How difficult do you think it might be? Thanks in
advance
> > for your input.
> > Tom
> >
> >
>
>