Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Find Fields in a table in asp

  • 03-07-2002 12:11pm
    #1
    Registered Users, Registered Users 2 Posts: 2,660 ✭✭✭


    I am working on a database driven asp site, and I was wondering if there is anyway to find out what fields a certain table has in an asp page, as I'm too lazy to download the database (it would require a me to reboot to windows). I know there is a "describe table" in mysql but is that sql or is it proprietary to mysql, and if it is sql what does it return in asp? I would assume a recordset, but if you dont know the fields in the first place how do you access the information? I'd say its simple and when I'm told I'll kick myself, but thanks in advance :)


Comments

  • Registered Users, Registered Users 2 Posts: 19,396 ✭✭✭✭Karoma


    i probably completely misunderstood that... but
    SELECT * .... ?


  • Registered Users, Registered Users 2 Posts: 437 ✭✭Spunj


    I think its more like:
    
    Dim rs, i
    
    'open your connection to the database, recordset
    rs.activeconnection = gCon '(or whatever your db connection is)
    'any other recordset stuff
    
    'after its open list the fields
    for i = 0 to rs.Fields.Count -1
        response.write rs.Fields(i).Name & vbCrLf
    next i
    
    
    Hope thats the kind of thing you mean

    - Spunj


  • Registered Users, Registered Users 2 Posts: 2,660 ✭✭✭Baz_


    Spunj looks like he had it, but in the end I did the more active downloading of the db, so my questions have been answered.

    ta for the replies though.


Advertisement