Java Reference
In-Depth Information
in Figure 11-80. Use the project, StockTracker, to add additional users and
stocks, if necessary. For an extra challenge, use only the StockTrackerDB data
access class to obtain data from the database.
FIGURE 11-80
5 Using a Prepared Statement for Dynamic Queries
Modify the solution for Assignment 4 above to allow a single user ID to be
entered at the keyboard. Use a prepared statement for all SQL commands, and
do not use the StockTrackerDB data access class. Again, this can be a console
application that produces output to the screen, as shown in Figure 11-81.
Hint: Review the Stringlength() method and the use of a BufferedReader to get
input at the command line.
FIGURE 11-81
Search WWH ::




Custom Search