>
> Are you sure that this is the correct maillist you ask
> this question

You're right it was for another forum.. i'm sorry..

However i've try your solution and these is not working..
I see that min() function return ever 1 row though is an empty row.

Thanks..




On Fri, Mar 14, 2014 at 12:05 PM, Lothar Kimmeringer <j...@kimmeringer.de>wrote:

> Am 14.03.2014 11:52, schrieb Davide Micheletti:
> > Hi all, i've these code to know if the resultSet is empty
> >
> > sql = "SELECT MIN(date) FROM table1 WHERE date > " +data1;
> >
> > Statement s = conn.createStatement();
> > ResultSet rset = s.executeQuery(sql);
> >
> > // it can be empty
> > if(rset.next()){
> >     // DO SOMETHING
> > } else {
> >    // DO OTHER THINGS
> > }
> >
> > but if the resultSet is empty it isn't catched.. Why??
> > is for the MIN() function in the SQL?? if yes what can i do??
>
> Are you sure that this is the correct maillist you ask
> this question? But to answer your question, you can do it e.g.
>
> "select date from table1 where date > " + data1 + " order by 1 asc limit 1"
>
> Please don't use this code productively since it's vulnerable
> to SQL-injection-attacks.
>
>
> Regards, Lothar
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to