AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Autogenerating Prepared Statements

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
FGB
Guest





PostPosted: Thu Jul 24, 2003 3:47 am    Post subject: Autogenerating Prepared Statements Reply with quote



I have a database with about 200 tables. Most of my inserts are quite
simple: INSERT INTO TABLE_NAME ( ... ) VALUES ( ...)

I'm thinking about writing a program to auto-generate Prepared
Statements, 1 for each table in the database.

It should be possible to do this by querying the database for meta data
about it's tablespace.


Has anyone ever done this or know of some code/tool that does?


Thanks,
Fred Burkley

Back to top
Chris Smith
Guest





PostPosted: Thu Jul 24, 2003 12:09 pm    Post subject: Re: Autogenerating Prepared Statements Reply with quote



FGB wrote:
Quote:
I have a database with about 200 tables. Most of my inserts are quite
simple: INSERT INTO TABLE_NAME ( ... ) VALUES ( ...)

I'm thinking about writing a program to auto-generate Prepared
Statements, 1 for each table in the database.

It should be possible to do this by querying the database for meta data
about it's tablespace.


Has anyone ever done this or know of some code/tool that does?

I have done it, actually for insert, delete, select, and update
statements, matching them to JavaBeans property accessors and mutators
in a data access object. Actually, once you've done that, you've
essentially got the basis for a REALLY simple O/R mapper.

I can't give out my code, really, because it's proprietary. I will be
happy to answer questions about how to do it, though. Not really
difficult, if not trivial either; it took all of a three-day weekend to
put it together and have confidence that it works.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Back to top
Daniel Hagen
Guest





PostPosted: Fri Jul 25, 2003 12:32 pm    Post subject: Re: Autogenerating Prepared Statements Reply with quote



You might want to take a look at JDO (www.jdocentral.com)

Regards

Daniel

FGB <au714 (AT) osfn (DOT) org> wrote

Quote:
I have a database with about 200 tables. Most of my inserts are quite
simple: INSERT INTO TABLE_NAME ( ... ) VALUES ( ...)

I'm thinking about writing a program to auto-generate Prepared
Statements, 1 for each table in the database.

It should be possible to do this by querying the database for meta data
about it's tablespace.


Has anyone ever done this or know of some code/tool that does?


Thanks,
Fred Burkley

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.