Re: JSP/JSTL problem

2007-01-03 Thread murthy gandikota
Many thanks for your kind response. I was using a form that was submitted twice for any given new ssn. I have also benefited from your comments on how to write a better java code. Turns out my html and javascript skills need improvement. Many thanks again. Regards David Griffiths <[EMAIL P

Re: JSP/JSTL problem

2007-01-02 Thread David Griffiths
This is a little dangerous as well; if an exception gets thrown, the statement doesn't get closed. My sample code is below. That said, your query looks fine. Add logging to your code to figure out what's going on. Run your query by hand against your database; I suspect you have an issue with

Re: JSP/JSTL problem

2007-01-02 Thread murthy gandikota
I tried everything you suggested. 'Think it is the way I have set up the table in MYSQL. This is the table ++---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | ++---+--+-+-+---

Re: JSP/JSTL problem

2007-01-02 Thread murthy gandikota
Here is the code: ps = con.prepareStatement("select first, last from cust where ssn=?"); int ssnint = Integer.parseInt(ssn.trim()); ps.setInt(1, ssnint); ResultSet rs=ps.executeQuery(); if ( rs.next()) { rs.close(); out.println("Cust

Re: JSP/JSTL problem

2006-12-30 Thread murthy gandikota
I am getting the same result in Java code, i.e. the resultset returned is non-null even though the primary key value is not found in the table. Hassan Schroeder <[EMAIL PROTECTED]> wrote: On 12/29/06, murthy gandikota wrote: > I am posting the relevant JSTL code. Just to clarify: you're *not

JSP/JSTL problem

2006-12-29 Thread murthy gandikota
Hi I have created a table with the following specs: create table `cust` ( `ssn` int(9) NOT NULL PRIMARY KEY, `submitdate` date, `submitto` int(3), `first` varchar(30), `last` varchar(30), `loanAmt` decimal(10,2), `company` int(3),