Page 1 of 1

SAMPLE OF A TREEVIEW WITH MDB

Posted: Sat Feb 09, 2008 9:44 pm
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 ?

Posted: Sun Feb 10, 2008 2:43 am
by nageswaragunupudi
Mr Silvio

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

Re: SAMPLE OF A TREEVIEW WITH MDB

Posted: Sun Feb 10, 2008 8:20 am
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

Posted: Sun Feb 10, 2008 9:20 am
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