1)Validation, 2)Reflect Error Message from Access to JDBC

C

Chee Hon

Hi all,

hope somebody can help me with this:

Firstly, I have a table with 2 columns, Product and Qty Purchase.

I want to set a restriction on the Qty Purchase to a maximum of 5 for one of
the product, say "Football". I have no restrictions for other type of balls
such as basketball or volleyball, customers are free to buy any number.

In short, I want to restrict Qty<5 for only one of the Product.

How do I do that? Do I need to use SQL? Input mask? or Lookup value?

Secondly, after the restriction how do I transfer the error message to the
HTML page via JDBC. I already got everything working in my servlet, except
for transferring the error message from Access to JDBC and reflecting it on
HTML.

How do I do this? catch (SQLException e){pw.println(e.getMessage());}?

Is this the correct way to capture error message from access?

Chee Hon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top