CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Reading Column Names in VB script

    My database is in MS Sql Server 7.0. How can I return the name of the column in a table so that I can use it processing. I have no problems accessing the data using the column names but I would like to have the column name returned instead of the data.


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Reading Column Names in VB script

    the sp_columns system stored procedure returns the column information for all columns of a table.
    Execute it ("exec sp_columns 'yourtable'") and find the column namens in the first field of the recordset.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured