Home > AS/400 News > Key tips when using JDBC to update databases
AS/400 News:
EMAIL THIS

Key tips when using JDBC to update databases

By Jim Mason
01 Apr 2003 | Search400.com

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

Key tips

Commitment control
Remember, in practice, you really want full commitment control on your database transactions. You won't select the option I did to set the transaction isolation level for the JDBC connection to none. See java.sql.Connection class for more on the specific JDBC transaction isolation levels. You can choose the data access concurrency control policy you want using the available choices in the Connection class.

You can use auto commit in some cases to easily allow the JDBC driver to manage committing the changes you make to the database after every single statement. As in my example here, in many cases, you'll want to commit or rollback changes to the database as a unit. In those cases, you'll set the commitment control to program (connection.setAutoCommit(false)).
Authority
In the real world, to run my example on an iSeries, the user profile running the example would have to have full authority to read, write and create objects in the specified data library.
JDBC operation
JDBC runs in background threads in SQL server mode. The Java toolbox jobs for JDBC can be identified in SYSWRK subsystem by the job name of QZDASOINIT. In addition to looking at local error messages in the client job running the JDBC commands, you can also look in these server jobs for more detailed messages based on the logging level setup for these jobs in the job description.



Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


iSeries Application Development: CL, COBOL, RPG, VB, ILE, Java
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts