FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour SAMPLE OF A TREEVIEW WITH MDB
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
SAMPLE OF A TREEVIEW WITH MDB
Posted: Sat Feb 09, 2008 09:44 PM

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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
SAMPLE OF A TREEVIEW WITH MDB
Posted: Sun Feb 10, 2008 02:43 AM

Mr Silvio

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

Regards



G. N. Rao.

Hyderabad, India
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: SAMPLE OF A TREEVIEW WITH MDB
Posted: Sun Feb 10, 2008 08:20 AM
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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
SAMPLE OF A TREEVIEW WITH MDB
Posted: Sun Feb 10, 2008 09:20 AM

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

Continue the discussion