whats the difference between
while(dr.Read())
{
}
and
if(dr.Read())
{
}
One is a loop and the other one is not. A While loop will always run at lease one time. Where a IF statement is true or false, if true then do this, if not then don't.
Hope this helps
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.