HerongYang.com Reference Citations - Version 2.80, by Dr. Herong Yang
MySQL prepared statement in Java not returning a value
'Using ResultSetMetaData Objects to List All Fields' tutorial was cited in a stackoverflow.com forum post in 2014.
The Using ResultSetMetaData Objects to List All Fields tutorial was cited in a stackoverflow.com forum post in 2014.
Subject: MySQL prepared statement in Java not returning a value Date: Aug 4, 2014 Author: Alex Source: http://stackoverflow.com/questions/25110419 /mysql-prepared-statement-in-java-not-returning-a-value >I have a web service method that executes a prepared statement >against a MySQL database. When I run this statement in MySQL I >get a returned value: > >SELECT first_name > FROM lytthouse_airlines.passenger > WHERE passenger_id = 1 >; > >but when I run this prepared statement in my java class, it doesn't work: >... Try to replace 'if (rs.next())' to while(rs.next()), then dump all records like in this example herongyang.com /JDBC/sqljdbc-jar-ResultSetMetaData.html ...
Table of Contents