-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Libraries and Tables in AS400
PostPosted: Thu Nov 20, 2003 4:32 am 
Newbie

Joined: Tue Nov 18, 2003 9:12 am
Posts: 4
Hi,
I have some questions about hibernate. First of all, my company has a as400 with database db2. The database isn't relational database. Then, it's good idea work with hibernate?

This database has libraries and inside this libraries has tables.

LIBRARY
|
|---Table1
|---Table2

When I do a query with sql with ODBC or JDBC the syntax is "SELECT * FROM LIBRARY.TABLE"
I can do the same with hibernate??? Moreover, I can have a class that represents LIBRARY??? I want to have the same organitation between libraries and tables.

Thanks,
SERGI


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 20, 2003 4:54 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
If I understand correctly, a "library" is what we call "schema".

Other people are using DB2 on AS400.


Top
 Profile  
 
 Post subject: AS400 :
PostPosted: Thu Nov 20, 2003 5:57 am 
Newbie

Joined: Thu Nov 13, 2003 6:50 am
Posts: 8
Which drivers are you using ? The JTOpen drivers? If so this is how we have it configured. then you can just select results like so :

select * from table

and you do not need to specific the schema or library name.


jdbc:as400://SERVERNAME;libraries=lib1,lib2;naming=system;server name=SERVERNAME;database name=DBNAME;

You can get these driver from :

http://www-124.ibm.com/developerworks/oss/jt400/

Mike


Top
 Profile  
 
 Post subject: 2E or Cool:Plex ?
PostPosted: Thu Nov 20, 2003 5:58 am 
Newbie

Joined: Thu Nov 13, 2003 6:50 am
Posts: 8
Are you using 2E or Cool:Plex programs?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 20, 2003 6:27 am 
Newbie

Joined: Tue Nov 18, 2003 9:12 am
Posts: 4
OK
Yes, I have the JTOpen library from IBM.

my hibernate.properties is

hibernate.connection.driver_class = com.ibm.as400.access.AS400JDBCDriver
hibernate.connection.url = jdbc:as400://192.168.xx.xx/library
hibernate.dialect=net.sf.hibernate.dialect.DB2Dialect

I have tryed with jdbc:as400://192.168.xx.xx;libraries=lib1,lib2; and i haven't got any problems. It's fantastic!

Thanks. One question, what is 2E or COOL:PLEX????


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.