Page 1 of 1

Structure of a Table ?

Posted: Sun Jul 13, 2008 4:43 am
by Armando
Hi Friends:

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

Regards and thanks in davance

Re: Structure of a Table ?

Posted: Sun Jul 13, 2008 4:50 am
by Patrick Mast
Armando wrote:Is there a way to know the structure of a MySql table ?
With SQLRDD its DbStruct()

Patrick

Re: Structure of a Table ?

Posted: Sun Jul 13, 2008 12:08 pm
by Enrico Maria Giordano
Try using ADOX:

Code: Select all

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

Posted: Sun Jul 13, 2008 5:12 pm
by Armando
Friends:

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

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

Best regards for all