SAMPLE OF A TREEVIEW WITH MDB

Post Reply
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

SAMPLE OF A TREEVIEW WITH MDB

Post by Silvio »

TO OPEN A FILE i MADE :

oRs = CREATEOBJECT( "ADODB.Recordset" )
TRY
oRS:Open( "SELECT * FROM CATEGORIE ORDER BY SCATEGORIE", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=ecom.mdb", 1, 3 )

CATCH oErr
? oErr:Description
RETURN NIL
END TRY


NOW i MUST CREATE A LISTBOX TREEVIEW WITH THIS MAP

sCATEGORIE
-----> CATEGORIE
-----> CATEGORIE
sCATEGORIE
-----> CATEGORIE

HAVE YOU ANY SAMPLE ?
Best Regards, Saludos

Falconi Silvio
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

Mr Silvio

There are several ways. I shall post two alternatives. Pl give me some time
Regards

G. N. Rao.
Hyderabad, India
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: SAMPLE OF A TREEVIEW WITH MDB

Post by Enrico Maria Giordano »

Silvio wrote:TO OPEN A FILE i MADE :

oRs = CREATEOBJECT( "ADODB.Recordset" )
TRY
oRS:Open( "SELECT * FROM CATEGORIE ORDER BY SCATEGORIE", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=ecom.mdb", 1, 3 )

CATCH oErr
? oErr:Description
RETURN NIL
END TRY


NOW i MUST CREATE A LISTBOX TREEVIEW WITH THIS MAP

sCATEGORIE
-----> CATEGORIE
-----> CATEGORIE
sCATEGORIE
-----> CATEGORIE

HAVE YOU ANY SAMPLE ?
You can use TTreeView class.

EMG
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

Mr Silvio

I sent a small sample to your personal email. Yes it uses TTreeView also as one of the alternatives.

Incidentally there is another way of reading parent - child relationships, which is called DataShaping. I did not include this, because it is more advanced and complex
Regards

G. N. Rao.
Hyderabad, India
Post Reply