Click here to Skip to main content
16,006,605 members

Comments by padiharprem (Top 3 by date)

padiharprem 25-Sep-14 7:25am View    
How open formview edit mode base on click edit button on gridview

Please solution provided to me i am try it but i am not get success
padiharprem 25-Sep-14 7:23am View    
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
padiharprem 19-Oct-12 7:20am View    
Deleted
DataTable dt = new DataTable();
string query = "select column_name from information_schema.columns where table_name ='" + Session["name"] + "' " + "order by ordinal_position";
//string query = "SELECT column_name FROM INFORMATION_SCHEMA.Columns where TABLE_NAME = '" + Session["name"] + "'";

error in the line
SqlDataAdapter dAdapter = new SqlDataAdapter(query, con);
dAdapter.Fill(dt);
string ColumnsName_String = "";
for (int i = 0; i <= dt.Rows.Count - 1; i++)
{
ColumnsName_String = ColumnsName_String + "," + dt.Rows[i];
}
if (ColumnsName_String.StartsWith(","))
{
ColumnsName_String = ColumnsName_String.Remove(0, 1);
}
Label1.Text = ColumnsName_String;


how to get the name of columns instead of "System.data.datarows"

error on the line ColumnsName_String = ColumnsName_String + "," + dt.Rows[i];