Datagrid error - empty object or column names

Aarvee

Well-known member
Joined
Sep 21, 2005
Messages
50
Location
Bangalore, India
Programming Experience
Beginner
Hi !

In my datagrid, after it displays the data, it gives an error as follows :

"Cannot use empty object or column names. Use a single space if necessary."

Since this is not my message, it is obviously a system generated error message. Also I am not able to locate which line generates it and hence am not able to debug the same.

Since I am unable to locate the line which causes this error, I am not sure which portion of my code I have to post here.

Also I am not able to get any explanation for this from MSDN. Incidentally could anyone tell me how to get explanations for error messages ?

Any guidance in resolving this would be highly appreciated.

Thanks in advance.

Varadarajan R

Joiner - When I was posting this in this forum some error happened in my internet connection and I could not locate my own message. Hence I posted it second time in winforms forum also.

Please reply only in this forum since this seems to be more relevant topic.

Sorry for the inconvenience.

Varadarajan R
 
Last edited:
While debugging, if you get an unhandled exception you should press the Break button and the IDE will highlight the line on which execution halted. You can then put that line in a Try...Catch block and call ToString on the exception in the Catch block to get more information:
VB.NET:
Try
    'Offending code here.
Catch ex As Exception
    MessageBox.Show(ex.ToString())
End Try
The MessageBox will include a call stack which will pinpoint exactly where the exception was thrown and how the code got there.
 
Back
Top