Hmm, I guess I don't totally understand this meta data stuff yet.

Lets say I use HSQLDB Database manager and create the following table:

CREATE TABLE CLO_ASSET
(
  ISCI                         VARCHAR (50)  NOT NULL,
  IMAGEID                      VARCHAR (50)  NOT NULL,
  ANUM                         INTEGER (4)    NOT NULL,
  MASTER_REC_NUM               VARCHAR (10),
  RECST_REF_NUM                VARCHAR (15)
)

Then in my test app (thanks Karl for the assistance in understanding and
great example)  I look at the CLO_Asset table and print out a line for each
column using:

System.out.println(meta.getColumnLabel(i+1) + " - " + " - " +
meta.getColumnType(i+1));

I get the following:

ISCI -  - 12
IMAGEID -  - 12
ANUM -  - 4
MASTER_REC_NUM -  - 12
RECST_REF_NUM -  - 12

So I thought  that 12 must equal VarChar data type and 4 must equal
an Integer data type. Indeed it is the SQL Type

So I used getColumnTypeName() and that displays Varchar, etc instead of the
SQL Type.

How can I get the column size (like 10, 50, 4, 10, 15)

Thanks,

-Jason

-----Original Message-----
From: J. Todd Slack [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 12:58 PM
To: [EMAIL PROTECTED]
Subject: RE: [Hsqldb-developers] MetaData example?



OK, I am getting closer. getColumnType() tells me the type, but not all of
it?

All I see is a 2 or whatever the number of chars/integers are.

I don't see varchar, etc.

Any thoughts? (as I try to find that JDBC book I thought I owned..)

-Jason







-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
hsqldb-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hsqldb-developers

Reply via email to