How to check if result of request to DB is empty?

Suliman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Dec 12 02:28:17 PST 2015


it's seems that next block is execute even if is rs.next() is 
false:

writeln("rs.next()-->", rs.next());
if(!rs.next()) //if user do not in DB
{
// is execute even if rs.next() is false
writeln("Executed, but rs.nst was set to false");
}

The output:
> rs.next()-->false
> Executed, but rs.nst was set to false

Why?




More information about the Digitalmars-d-learn mailing list