Structure of a Table ?

Structure of a Table ?

Postby Armando » Sun Jul 13, 2008 4: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
User avatar
Armando
 
Posts: 3229
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Structure of a Table ?

Postby Patrick Mast » Sun Jul 13, 2008 4:50 am

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

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Re: Structure of a Table ?

Postby Enrico Maria Giordano » Sun Jul 13, 2008 12:08 pm

Try using ADOX:

Code: Select all  Expand view  RUN
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
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Armando » Sun Jul 13, 2008 5: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
User avatar
Armando
 
Posts: 3229
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 94 guests