Hello! Please excuse my ignorance, I'm just a humble ASP programmer trying his best to learn JSP. I'm setting up a database connection (no problem), looking to see if a record exists. If it exists, I need to collect the information, if it doesn't, I need to add a new record. Quite simple actually. In ASP, we would use a line like: If recordSet.EOF Then to determine if the recordset is already at the end. Is there something like this in JSP? I have no problem connecting and retrieving information, but I have no clue how to determine if the record exists, and how to add it, if it doesn't. Thanks for any help!
Well, there is a method that you use to run through the record set: next() This method moves the cursor in the ResultSet and returns a boolean of it's success. So if you are searching for a specific record:
I am not sure if this is what you are talking about, so let me know if I am on the right track.
posted 15 years ago
Well, I had no idea that next() could be used in that way. Thanks!
What a stench! Central nervous system shutting down. Save yourself tiny ad!
Programmatically Create PDF Using Free Spire.PDF with Java