Failed to convert parameter value from a Guid to a String
Posted
by user320460
on Stack Overflow
See other posts from Stack Overflow
or by user320460
Published on 2010-04-20T12:01:59Z
Indexed on
2010/04/20
12:13 UTC
Read the original article
Hit count: 255
Hello,
I am at the end of my knowledge and googled for the answer too but no luck :/
Week ago everything worked well.
I did a revert on the repository, recreated the tableadapter etc... nothing helped.
When I try to save in my application I get an SystemInvalidCastException at this point:
PersonListDataSet.cs:
partial class P_GroupTableAdapter
{
public int Update(PersonListDataSet.P_GroupDataTable dataTable, string userId)
{
this.Adapter.InsertCommand.Parameters["@userId"].Value = userId;
this.Adapter.DeleteCommand.Parameters["@userId"].Value = userId;
this.Adapter.UpdateCommand.Parameters["@userId"].Value = userId;
return this.Update(dataTable); **<-- Exception occurs here**
}
}
Everything is stuck here because a Guid - and I checked the datatable preview with the magnifier tool its really a true Guid in the column of the datatable - can not be converted to a string ??? How can that happen?
© Stack Overflow or respective owner