FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Structure of a Table ?
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Structure of a Table ?
Posted: Sun Jul 13, 2008 04:43 AM

Hi Friends:

Is there a way to know the structure of a MySql table ?

Regards and thanks in davance

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 246
Joined: Sat Mar 03, 2007 08:42 PM
Re: Structure of a Table ?
Posted: Sun Jul 13, 2008 04:50 AM
Armando wrote:Is there a way to know the structure of a MySql table ?
With SQLRDD its DbStruct()

Patrick
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Structure of a Table ?
Posted: Sun Jul 13, 2008 12:08 PM
Try using ADOX:

FUNCTION MAIN()

    LOCAL oCat

    LOCAL i, j

    oCat = CREATEOBJECT( "ADOX.Catalog" )

    oCat:ActiveConnection = "your connection string"

    FOR i = 0 TO oCat:Tables:Count() - 1
        ? oCat:Tables( i ):Name
        ?

        FOR j = 0 TO oCat:Tables( i ):Columns:Count() - 1
            ? SPACE( 4 ) + oCat:Tables( i ):Columns( j ):Name
        NEXT

        ?
    NEXT

    RETURN NIL


EMG
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Structure of a Table ?
Posted: Sun Jul 13, 2008 05:12 PM

Friends:

Patrick, thanks for your answer but I have not SQLRDD. :(

Enrico: thanks for your reply, problem solved. :D

Best regards for all

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero

Continue the discussion