This looks ideal. I was just going through the motions of
writing a generic stored procedure handler class, but this
simplifies things no end.

Pity the source is so difficult/time consuming to get from the
web site referenced.

Mark

 ----------
From: jon *
To: [EMAIL PROTECTED]
Subject: Use Village to make your life easier! (was: Re: Prepared Statement
with two database tables.)
Date: 12 May 1999 19:52

Before:

registerStatement =
     dbConnection.prepareStatement("insert into Classifieds "
      + "(Name, Address, City, State, Zip, Email, Phone, PayMethod,
CardNumber, CardMo, CardYr, StartDate, EndDate, AmtForDayMoYr, ClassifiedAd,
WhatAdSays01, WhatAdSays02, WhatAdSays03, WhatAdSays04, WhatAdSays05,
WhatAdSays06, WebSite, UniqueDateId)"
 + " values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?)");


After:

TableDataSet tds = new TableDataSet ( connection, "Classifieds" );
Record rec = tds.addRecord();
rec.setValue ("Name", name );
rec.setValue ("Address", address );
rec.setValue ("City", city );
rec.setValue ("State", state );
...
tds.save();
tds.close();

No more counting "?"'s and hoping that you get it right. Fully open source
software under the LGPL license.

<http://www.working-dogs.com/village/>

 -jon

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to