Databases Reference
In-Depth Information
}
catch(Exception e)
{
Console.WriteLine("Error: " + e);
}
finally
{
// close connection
conn.Close();
}
}
}
}
3. Make FilterSort the startup project, and run it by pressing Ctrl+F5. You should see
the results in Figure 13-4.
Figure 13-4. Filtering and sorting a data table
How It Works
You code and combine two queries for execution on the same connection.
// query 1
string sql1 = @"
select
*
from
customers
";
Search WWH ::




Custom Search