hello group members

how can we check whether database query has returned any records or not ?

my query is like "select max(empid) as maxid from employees"

if there are no records returned (meaning if table is empty), how can i check it?

thanks for help

>how can we check whether database query has returned any records or not ?
>my query is like "select max(empid) as maxid from employees"

ExecuteScalar() method of Command class return null or max empid.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.