Re: postgres-jdbc

Поиск
Список
Период
Сортировка
От mikael-aronsson
Тема Re: postgres-jdbc
Дата
Msg-id 019801c52af7$d9bb0bd0$8ba7e551@w128mtec
обсуждение исходный текст
Ответ на postgres-jdbc  (aparna <aparna@chintech.org>)
Список pgsql-jdbc
Hi !

The meta data gives all information you need about the tablöe, for example
to get column names you could:

ResultSet rs = ....
ResultSetMetaData meta = rs.getMetaData();
int count = meta.getColumnCount();
String[] cols = new String[ count];
int i;

for( i = 1; i <= count; i++)
  cols[ i - 1] = meta.getColumnLabel( i);

I am not sure if this is what you want, if it is this all part of the JDBC
standard so just look it up in the JDBC docs.

Mikael

----- Original Message -----
From: "aparna" <aparna@chintech.org>
To: <pgsql-jdbc@postgresql.org>
Sent: Thursday, March 17, 2005 2:40 PM
Subject: [JDBC] postgres-jdbc


> hi
> I'm a computer student.
> as part of my mini project i'm working on the project GUI frontend for
> postgres.
>
> i'm doing it in Java.
> Is there any way to retrieve the structure of a table from the java
> program and display it?
>
> I tried to execute the command \d using the program.
> it worked.
> But i couldn't get the result.
> Can anybody help?
> Please send mail to
> aparna@chintech.org
> --regards aparna
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: aparna
Дата:
Сообщение: postgres-jdbc
Следующее
От: "Chris Smith"
Дата:
Сообщение: Re: postgres-jdbc