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.  [ 2 posts ] 
Author Message
 Post subject: How to read data dynamically
PostPosted: Tue Apr 10, 2007 4:09 am 
Newbie

Joined: Wed May 04, 2005 9:34 am
Posts: 16
Location: Germany
Hello,

i have the following situation and need a hint how to go on. I have a database where some of the tables are dynamically written out of another database. I don´t know the structure of these tables because the sql-command to extract the data from the other database can be dynamically build by the user. He builds the command to extract the data from one or more tables using joins, groupings and so on. The result of these queries are tables in that second database. So all i know is the name of these tables, i don´t know the name of the fields, not the type and not even the number of fields. By the way, there are no relationships between these tables.

Now i want to read the data from that table where i only know the name of. And i want to display it in a tableView. And i also want to determine the name of the fields. I wonder how i can do that with hibernate.

With other languages like Visual Basic i could just sent a sql-command to the database like "select * from <table>". The result was a recordset and i could parse that recordset for the names of the fields. And i could extract the data from the recordset and display it in whatever fasion i prefer. Is there something similar in hibernate?

I have read about dynamic components and about changing the "entity-representation-mode" to dom4j or map. But for all that i still need more information about the structure of my data than the information i have.

Can anybody here tell me a way how to solve my problem and maybe even point me to an example of how to implement it?

Thanks very much for your help.
Christoph

Hibernate version:
3.2.3

Name and version of the database you are using:
SQL-Server 7.0
Oracle 9i


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 10, 2007 8:53 am 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
http://www.hibernate.org/hib_docs/v3/re ... /#querysql


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.