If column not found in table or columns is added,how to handle it asp.net
-
Hi, Our application receives datas from 2 application and it is stored in SQL database. Some times in a table the column may be there or may not be there.Some times row may or may not be there. How to handle such situation in asp.net? I had used dataset and datatable,but it throws exception if column is not there in the Stored procedures. Guhananth.S
-
Hi, Our application receives datas from 2 application and it is stored in SQL database. Some times in a table the column may be there or may not be there.Some times row may or may not be there. How to handle such situation in asp.net? I had used dataset and datatable,but it throws exception if column is not there in the Stored procedures. Guhananth.S
Did you check for number of columns and number of rows? e.g.
DataTable dtData= YourClass.GetDataTable("select * from yourtableName");
if(dtData.Columns.Count==0){return;}
if(dtData.Rows.Count ==0){return;}
I Love T-SQL "VB.NET is developed with C#.NET" If my post helps you kindly save my time by voting my post.
-
Hi, Our application receives datas from 2 application and it is stored in SQL database. Some times in a table the column may be there or may not be there.Some times row may or may not be there. How to handle such situation in asp.net? I had used dataset and datatable,but it throws exception if column is not there in the Stored procedures. Guhananth.S