Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Intermediate Java Work Book

Intermediate Java Work Book

Ratings: (0)|Views: 34 |Likes:

More info:

Published by: Girish Kumar Nistala on Jan 23, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less

04/29/2012

pdf

text

original

 
Intermediate JavaWork book
Prepared By: Java Delivery TeamDate:Reviewed By:Approved By:
Review Tracker:-S.noReviewer NameDateMajor ChangesMadeBeforeReviewV.Number After ReviewV.Number Signature
1.
 
Table of Contents
L3.4.3.4 Connecting to a Data Source...........................................................................................56
L3.6.2 Using CallableStatement methods to call stored procedures..........................................59http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/tjvcscsp.htm....................................................................................59
L3.7.2 Setting and Rolling Back to a Savepoint.........................................................................62
L3.7.3 Releasing a Savepoint....................................................................................................62oThe method Connection.releaseSavepoint takes a Savepoint object as a parameter andremoves it from the current transaction..............................................................................................62oOnce a savepoint has been released, attempting to reference it in a rollback operation causesan SQLException to be thrown..........................................................................................................62oAny savepoints that have been created in a transaction are automatically released and becomeinvalid when the transaction is committed, or when the entire transaction is rolled back...................62oRolling a transaction back to a savepoint automatically releases and makes invalid any other savepoints that were created after the savepoint in question............................................................62JDBC 3.0...........................................................................................................................................63Auto-Generated Keys........................................................................................................................64Conclusion.........................................................................................................................................64
Code Listing 1..........................................................................................................................................65Code Listing 2..........................................................................................................................................66Code Listing 3..........................................................................................................................................67Code Listing 4..........................................................................................................................................68Code Listing 5..........................................................................................................................................69Code Listing 6..........................................................................................................................................704.JDBC-Advanced concepts...................................................................................................................72
1
 
Code Listing 1..........................................................................................................................................81Code Listing 2..........................................................................................................................................81Code Listing 3..........................................................................................................................................81Code Listing 4..........................................................................................................................................835. Servlets Basics....................................................................................................................................85Code Listing 1........................................................................................................................................108Code Listing 2........................................................................................................................................111Application structure
Using URL paths
...............................................................................................................................126
7. Servlets – JDBC & Session Tracking...............................................................................................1298.JSP Introduction and Scripting Elements........................................................................................1439.JSP DIRECTIVES AND JSP ACTIONS...............................................................................................150SOLUTIONS............................................................................................................................................161
 java.sql.SQLException: [Oracle][ODBC][Ora]ORA-01756: quoted string not properly terminated......161 java.sql.SQLException: [Oracle][ODBC]Invalid transaction state........................................................162 java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00913: too many values.......................................162 java.sql.SQLException: [Oracle][ODBC][Ora]ORA-01722: invalid number..........................................162unexpected error EXCEPTION_ACCESS_VIOLATION......................................................................162When we close the connection and then try using it or don’t create a connection then we may get thiserror.....................................................................................................................................................162 java.sql.SQLException: [Oracle][ODBC]Invalid column number <7>..................................................163When we try to access an index of a table which does not exist then we get such a kind of error......163sun.jdbc.odbc.JdbcOdbcBatchUpdateException: [Oracle][ODBC][Ora]ORA-00001: unique constraint(SCOTT.SYS_C0060855) violated......................................................................................................163When we try to update a particular value in a table which is already defined as primary key then we getsuch kind of exception.........................................................................................................................163 java.sql.SQLException: [Oracle][ODBC][Ora]ORA-06550: wrong number or types of arguments in callto 'MYPROCIN'....................................................................................................................................163 java.sql.SQLException: [Oracle][ODBC][Ora]ORA-06550: object SCOTT.MYPROCOUT is invalid..163 java.sql.SQLException: [Oracle][ODBC][Ora]ORA-06550: object SCOTT.MYPROCINOUT is invalid............................................................................................................................................................163Variable outParam might not have been initialized..............................................................................163When we try to call a particular procedure in oracle with wrong type of arguments as parameters thenwe get such kind of exception.............................................................................................................163 java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state.................................163Since the cursor is at the last position it can't go to the next position..................................................163
2

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->