0 votes
ago in Education by (1.7m points)
I'm modifying someone else's code where a query is performed using the following:

DataSet ds = new DataSet();

SqlDataAdapter da = new SqlDataAdapter(sqlString, sqlConn);

da.Fill(ds);

How can I tell if the DataSet is empty (i.e. no results were returned)?

JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
ago by (1.7m points)
If I understand correctly, this should work for you

if (ds.Tables[0].Rows.Count == 0)

{

    //

}

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
...