File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Metadata - constructing CREATE of existing table..

 
Miro Ricco
Ranch Hand
Posts: 40
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
can anyone tell me where to find some documents about JDBC Metadata. Something about using it in a wider
scope. JDBC API is not enough.
I have to code program part which reads table metadata from DBMS and constructs DDL CREATE statement
of table definition.
Or is there any other way to find out that CREATE statement.
Thanks.
 
Rajendar Goud
Ranch Hand
Posts: 220
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
u can get some info and understanding about MetaData in the below mentioned link
http://members.aol.com/kgb1001001/Articles/JDBCMetadata/JDBC_Metadata.htm
Raj
 
Craig Demyanovich
Ranch Hand
Posts: 173
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing a similar requirement on a current project. I have a Column class that is very, very helpful in building a CREATE TABLE statement. If I find that, or someone can tell me that, there is no way to upload the file, I'll just post it as code, all 276 lines of it (it's fully documented). Or, with your permission, I could send it to you via email. By the way, I also have a unit test for it.
Craig
 
Craig Demyanovich
Ranch Hand
Posts: 173
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Miroslav,
I sent a private message in response to your private message re: this thread. View your profile to see your private messages, as my profile shows that you have not yet read the private message that I sent.
Good luck,
Craig
 
mark baum
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check out the subject also at http://www.coderanch.com/t/297040/JDBC/java/do-you-find-out-if
 
sanz nsgha
Ranch Hand
Posts: 42
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Craig, can we get a copy of the Column class too?
Thanks,
Sanjay
 
Craig Demyanovich
Ranch Hand
Posts: 173
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've looked at the FAQs; they state that attachments are not supported. Furthermore, I don't have a place on the web where I can place the file now. So, here's the code for copying and pasting:

If you have any questions or feedback, please reply or send me a private message. I'll post the current unit test next.
Craig
 
Craig Demyanovich
Ranch Hand
Posts: 173
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the unit test for the Column class:

Craig
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic