Structure of a Table ?

Post Reply
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Structure of a Table ?

Post by Armando »

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
User avatar
Patrick Mast
Posts: 244
Joined: Sat Mar 03, 2007 8:42 pm

Re: Structure of a Table ?

Post by Patrick Mast »

Armando wrote:Is there a way to know the structure of a MySql table ?
With SQLRDD its DbStruct()

Patrick
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Structure of a Table ?

Post 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
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Post 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
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
Post Reply