Click here to Skip to main content
15,886,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Experts

When we create table in MS Access we enter description of field in description column.

I am able to get the field name and data type from the table but how can I get the description from the table.

Here is the code by which I am getting field name
Java
public ArrayList<String> fetchtable(String value)
{
   try
   {
       makeConnection();
       String str1="Select * from "+ value;
       ResultSet rs = st.executeQuery(str1);
       rsmd = rs.getMetaData();
       NumOfCol= rsmd.getColumnCount();
       for(int i=1; i <= NumOfCol; i++)
       {
          ColumnName = rsmd.getColumnName(i);
          System.out.println(ColumnName);
          columns.add(ColumnName);
       }
      //System.out.println("Columns Valuessss is:" +columns);
    }catch(Exception ae){
      ae.printStackTrace();
     }
    return columns;
}
Posted
Updated 13-May-14 22:58pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900