if (Whatever the condition)
SqlConnection con = new SqlConnection("user id=user;" +
"database=db; " +
// Retrieving data from Stored Proceedure and bind it to datagrid
SqlCommand com = new SqlCommand("spx_storedProcName", con);
com.CommandType = CommandType.StoredProcedure;
SqlDataAdapter adapter = new SqlDataAdapter(com);
DataTable tbl = new DataTable();
DataGrid1.DataSource = tbl;
catch (Exception ex)
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.