pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedMore JDBC questions in 6.3
2+ messages / 2 participants
[nested] [flat]
* More JDBC questions in 6.3
@ 1998-03-06 15:37 Schlough, Mark <Mark.Schlough@nmb.norwest.com>
1998-03-06 21:48 ` Re: More JDBC questions in 6.3 Peter T Mount <pmount@maidast.demon.co.uk>
0 siblings, 1 reply; 2+ messages in thread
From: Schlough, Mark @ 1998-03-06 15:37 UTC (permalink / raw)
To: pgsql-interfaces; java-linux-help@java.blackdown.org; petermount@earthling.net; pmount@maidast.demon.co.uk
Thanks to everyone who gave me the
postmaster -i
command. It worked, and accepted commands! :-)
---------my other questions----------------
I am using the book "JDBC Database Access with Java" and after
using
some of the examples, (available for download from
http://www.javasoft.com/products/jdbc/book.html) I run into
problems.
I'm wondering if these methods are supported by the driver:
The questions so far seem to deal with ResultSetMetaData
I am having trouble getting it to return the datatypes, such as
VARCHAR, INTEGER, FLOAT,....
code snip ----- 8-< ----
ResultSetMetaData rsmd
int columns = rsmd.getColumnCount();
for (int i = 1; i<= columns; i++) {
int jdbcType = rsmd.getColumnType(i)
String name = rsmd.getColumnTypeName(i)
System.out.print("Column "+1+" is JDBC type " + jdbcType);
System.out.print(", which the DBMS calls " + name);
}
code snip ----- 8-< ----
the code runs, but I get results like:
Column 1 is JDBC type 12. which the DBMS calls null
Column 2 is JDBC type 4. which the DBMS calls null
Column 3 is JDBC type 8. which the DBMS calls null
Column 4 is JDBC type 4. which the DBMS calls null
does anyone know if these ResultSetMetaData methods that look at
the
datatypes are supposed to work, or are they not implemented?
If they are supposed to work, could someone help me figure out what
I
am missing.
Thanks in advance
Mark
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: More JDBC questions in 6.3
1998-03-06 15:37 More JDBC questions in 6.3 Schlough, Mark <Mark.Schlough@nmb.norwest.com>
@ 1998-03-06 21:48 ` Peter T Mount <pmount@maidast.demon.co.uk>
0 siblings, 0 replies; 2+ messages in thread
From: Peter T Mount @ 1998-03-06 21:48 UTC (permalink / raw)
To: Schlough, Mark <Mark.Schlough@nmb.norwest.com>; +Cc: pgsql-interfaces; java-linux-help@java.blackdown.org
On Fri, 6 Mar 1998, Schlough, Mark wrote:
> ---------my other questions----------------
>
> I am using the book "JDBC Database Access with Java" and after
> using
> some of the examples, (available for download from
> http://www.javasoft.com/products/jdbc/book.html) I run into
> problems.
> I'm wondering if these methods are supported by the driver:
>
> The questions so far seem to deal with ResultSetMetaData
>
> I am having trouble getting it to return the datatypes, such as
> VARCHAR, INTEGER, FLOAT,....
>
> code snip ----- 8-< ----
>
> ResultSetMetaData rsmd
>
> int columns = rsmd.getColumnCount();
> for (int i = 1; i<= columns; i++) {
>
> int jdbcType = rsmd.getColumnType(i)
> String name = rsmd.getColumnTypeName(i)
> System.out.print("Column "+1+" is JDBC type " + jdbcType);
> System.out.print(", which the DBMS calls " + name);
> }
>
> code snip ----- 8-< ----
>
> the code runs, but I get results like:
>
> Column 1 is JDBC type 12. which the DBMS calls null
> Column 2 is JDBC type 4. which the DBMS calls null
> Column 3 is JDBC type 8. which the DBMS calls null
> Column 4 is JDBC type 4. which the DBMS calls null
>
> does anyone know if these ResultSetMetaData methods that look at
> the
> datatypes are supposed to work, or are they not implemented?
>
> If they are supposed to work, could someone help me figure out what
> I
> am missing.
>
> Thanks in advance
>
> Mark
I'll check the current source to make sure nothing is broken, but this is
supported (and has been for quite some time)
--
Peter T Mount petermount@earthling.net or pmount@maidast.demon.co.uk
Main Homepage: http://www.demon.co.uk/finder
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1998-03-06 21:48 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-03-06 15:37 More JDBC questions in 6.3 Schlough, Mark <Mark.Schlough@nmb.norwest.com>
1998-03-06 21:48 ` Peter T Mount <pmount@maidast.demon.co.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox