none
The column mapping from SourceColumn failed because the DataColumn is a computed column RRS feed

  • Question

  • I'm trying to update a SQL Server Compact Edition database from a dataset and I get the following error "The column mapping from SourceColumn failed because the DataColumn is a computed column".

    The database has no computed columns.  My application adds a couple of computed columns to the dataset, but I've taken these out and I still get this error. The specific column it says is a computed column is definitely not a computed column either in the database or the dataset.

    Any idea what might be causing this problem?

    Thanks,

    Chuck
    Monday, December 7, 2009 5:05 PM

Answers

  • I checked very thoroughly and the datatable has no computed columns.  I was able to make this error go away, but I don't understand why it went away.  When I was getting this error, I was using TableAdapters to update the database.  I switched to using a TableAdapterManager and the error disappeared - nothing was changed in the databse.

    I have no idea of why a TAM would make a difference for this kind of error.

    Thanks,


    Chuck
    Tuesday, December 8, 2009 3:12 PM

All replies

  • Based on error message, it looks like your DataTable still has computed column. Did you check if columns do not have Expression property set to some sort of expression string?
    Val Mazur (MVP) http://www.xporttools.net
    Tuesday, December 8, 2009 11:26 AM
    Moderator
  • I checked very thoroughly and the datatable has no computed columns.  I was able to make this error go away, but I don't understand why it went away.  When I was getting this error, I was using TableAdapters to update the database.  I switched to using a TableAdapterManager and the error disappeared - nothing was changed in the databse.

    I have no idea of why a TAM would make a difference for this kind of error.

    Thanks,


    Chuck
    Tuesday, December 8, 2009 3:12 PM
  • Hello Chunk,

    Does the problem still exist if you use TableAdapters? 


    Best Regards,
    Lingzhi Sun


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, December 9, 2009 10:24 AM
    Moderator
  • Have you check the Expression property of DataColumn? I have seen this error before by miss-typing the default value into the Expression property of the DataColumn.
    Tuesday, June 1, 2010 9:33 AM
  • when this happened to me it was because i set the expretion property inadvertanly when trying to set the default value.

     

    was in a rush small quick mistake, lost an hour

    Monday, February 6, 2012 4:57 AM