MS Access query in JAVA..help me..
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   dk_pulam
Posted On:   Tuesday, April 13, 2004 03:43 AM


Hello!I'm trying to develop a software using JAVA swings,MSAccess .
I want to know the query for getting description of a table in Access ..i.e.,I want a the query similar to "DESC TABNAME" of oracle..in Access.pls help me.

Re: MS Access query in JAVA..help me..

Posted By:   David_Thornton  
Posted On:   Tuesday, April 13, 2004 08:24 PM

The java.sql.DatabaseMetaData interface provides access to table descriptions using the getTables() method. For example;



Connection con = DriverManager.getConnection(......)
ResultSet rs = con.getMetaData().getTables(......)


Refer to API documentation;


http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMetaData.html#getTables(java.lang.String, java.lang.String, java.lang.String, java.lang.String[])

About | Sitemap | Contact