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