Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 929
  • Last Modified:

Field descriptions

I am trying without success to get the field description from the table fields in a MySQL database into a C# program.

If someone would be so kind as to give me the "dummies" step by step version. I've Googled for it but got nothing I could understand. It seems like it should be something fairly simple. Please help.
0
Padriac
Asked:
Padriac
1 Solution
 
Raynard7Commented:
If you are using mysql 5

You can go to

Information_Schema.COLUMNS and the COLUMN_COMMENT field

otherwise you can extract it from the show create table - and pull it from there
0
 
todd_farmerCommented:
If you have MySQL 4.1, you can use the SHOW FULL COLUMNS FROM tablename syntax:

http://dev.mysql.com/doc/refman/4.1/en/show-columns.html

If you have 5.0, you can use the information_schema as Raynard7 said.
0
 
PadriacAuthor Commented:
Thanks Raynard7! That was just what I needed to get where I wanted. With your answer I was able to put together exactly the code I needed. Thanks again.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now