If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Typed Tables and JDBC

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-08-04, 04:34
Manish Jain Manish Jain is offline
Registered User
 
Join Date: Apr 2004
Posts: 2
Typed Tables and JDBC

Hi all,
I have a question regarding "Typed Tables" in DB2. Suppose we have following User Defined Structure Type and a table using this type.

CREATE TYPE db2admin.Person_t AS
(Name VARCHAR(20),
Age INT,
Address VARCHAR(200))
INSTANTIABLE
REF USING VARCHAR(13) FOR BIT DATA
MODE DB2SQL;

CREATE TABLE db2admin.Person OF db2admin.Person_t
(REF IS Oid USER GENERATED)

INSERT INTO db2admin.Person (Oid, Name, Age,Address)
VALUES(db2admin.Person_t('a'), 'Andrew', 20 ,'Indore');

select * from db2admin.Person

All these sqls work fine. Now my queston is Does i can do the same job through JDBC. I mean insert/update/select can be done using JDBC.

Problem being the table will be having four columns Oid,Name,Age and Address. The Oid is Ref type and really interested in how to handle it. I will be thankful if some one can explain with suitable eample.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On