|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--j3.mssql.JDBCHandler
Please check the JDBC connection constants defined below. This class uses JDatabase Wizard generated files to demonstrate how to use such classes. Note: Update operations on the result sets have been commented out.
Field Summary | |
private static java.lang.String |
CLASS
|
(package private) java.sql.Connection |
myConnection
|
(package private) SpParmSQL |
myParmSQL
|
(package private) java.lang.StringBuffer |
myReport
|
(package private) PersonSQL |
mySQL
|
private static java.lang.String |
PASSWORD
|
private static java.lang.String |
URL
|
private static java.lang.String |
USER
|
Constructor Summary | |
JDBCHandler()
Constructor create JDBC access classes |
Method Summary | |
private void |
absolute()
Move to 3rd record in recordset, and display its contents. |
private void |
close()
Close resultsets, statements and the jdbc connection |
private void |
closeStatements()
Close all open JDatabase Wizard classes (statements & resultsets) |
private void |
cursorTests()
Test cursor movement methods on PersonSQL |
private void |
deleteAll()
delete all records |
private void |
deleteOne()
Delete one record |
private void |
deleteRow()
Delete the current ResultSet row |
private void |
displayPersonData(PersonData data)
Display passed PersonData in a HTML table |
private void |
displayPersonDataRow(PersonData data)
Display ONE PersonData record as a HTML table row. |
private void |
displayResultSetInfo()
Display all misc. |
private void |
firstTests()
|
java.lang.String |
go()
Perform JDBC operations using the generated classes. |
private void |
insert()
Insert six records |
private void |
insertRow()
Move to insert position, then insert a record using the resultset |
private void |
lastTests()
|
private void |
selectAll()
select all records and display the resultset contents |
private void |
spParm()
Call the stored procedure which uses in/out parameters |
private void |
updateOne()
Update one record |
private void |
wrapException(java.lang.Exception e)
Captures the error message and call stack information from an exception and displays it. |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.lang.StringBuffer myReport
java.sql.Connection myConnection
PersonSQL mySQL
SpParmSQL myParmSQL
private static final java.lang.String CLASS
private static final java.lang.String URL
private static final java.lang.String USER
private static final java.lang.String PASSWORD
Constructor Detail |
public JDBCHandler()
Method Detail |
public java.lang.String go()
private void cursorTests() throws java.lang.Exception
java.lang.Exception
- private void displayResultSetInfo() throws java.lang.Exception
java.lang.Exception
- private void deleteRow() throws java.lang.Exception
java.lang.Exception
- private void firstTests() throws java.lang.Exception
private void lastTests() throws java.lang.Exception
private void absolute() throws java.lang.Exception
java.lang.Exception
- private void insertRow() throws java.lang.Exception
java.lang.Exception
- private void spParm() throws java.lang.Exception
java.lang.Exception
- private void deleteOne() throws java.lang.Exception
java.lang.Exception
- private void updateOne() throws java.lang.Exception
java.lang.Exception
- private void insert() throws java.lang.Exception
java.lang.Exception
- private void deleteAll() throws java.lang.Exception
java.lang.Exception
- private void selectAll() throws java.lang.Exception
java.lang.Exception
- private void closeStatements()
private void close()
private void wrapException(java.lang.Exception e)
e
- the exception to captureprivate void displayPersonDataRow(PersonData data)
data
- data to display, may not be null.private void displayPersonData(PersonData data)
data
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |