This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JDBC and the fly likes JDBC Metadata - constructing CREATE of existing table.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Metadata - constructing CREATE of existing table.." Watch "JDBC Metadata - constructing CREATE of existing table.." New topic
Author

JDBC Metadata - constructing CREATE of existing table..

Miro Ricco
Ranch Hand

Joined: Apr 16, 2002
Posts: 40
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

Joined: Mar 06, 2002
Posts: 220
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

Joined: Sep 25, 2000
Posts: 173
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

Joined: Sep 25, 2000
Posts: 173
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

Joined: Aug 21, 2001
Posts: 18
check out the subject also at http://www.coderanch.com/t/297040/JDBC/java/do-you-find-out-if
sanz nsgha
Ranch Hand

Joined: Jan 18, 2002
Posts: 42
Craig, can we get a copy of the Column class too?
Thanks,
Sanjay
Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173
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

Joined: Sep 25, 2000
Posts: 173
Here's the unit test for the Column class:

Craig
 
GeeCON Prague 2014
 
subject: JDBC Metadata - constructing CREATE of existing table..