• well, the web page itself would run the query, and stick the results in either an ADODB.Recordset, or a .NET DataTable or DataReader, right?

    both of those have access to teh column names automatically... it's built in...

    for example, in an asp page using ADODB recordset,

    Response.Write " "

    Do while not rs.EOF

    For widgit = 0 to rs.Fields.Count -1

    Response.Write rs(widgit).Name & ": " & rs(widgit).Value & "

    "

    Next 'widgit

    rs.MoveNext

    Loop

    if it was .NET, it would be DataTable.Columns(0).ColumnName, iterating thru DataTable.Columns.Count -1

    is that the question?

    at work (2/11/2009)


    Hi Lowell,

    Thanks for helping out.

    Yes it is the column headers for the INFORMATION_SCHEMA that I am trying to return with the schema information e.g.

    TABLE_CATALOG',

    'TABLE_SCHEMA',

    'TABLE_NAME',

    'COLUMN_NAME',

    'ORDINAL_POSITION'

    etc etc etc

    I saw the solution you have offered while I was google'ing, however, the results are being sent to a web page and the site is hosted in a shared environment and I don't have access to the options you are suggesting. I'm sure it can be achieved in a single sql query though, I just can't figure it out!

    Any other ideas? 🙂

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!