Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Evaluation Exception with Guids
Message
From
23/02/2007 19:35:34
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Database:
MS SQL Server
Miscellaneous
Thread ID:
01198445
Message ID:
01198497
Views:
8
Richard,

Did you try:
dr["MatchedTo"] = dv[0]["UniqueID"];
That should be all you need to do.

~~Bonnie




>Found it. It was the filter for the DataView. I needed to convert the Guid to a System.String to test for null.
>
>
>
>
>>I keep getting an EvaluationException that says : Cannot perform '=' operation on System.Guid and System.Int32.
>>
>>The exception is at this line:
>>
>>dr["MatchedTo"] = (System.Guid)dv[0]["UniqueID"];
>>
>>
>>dr is a datarow and MatchedTo is defined as a System.Guid in a DataSet. dv is defined as a Dataview and UniqueID is also defined as a System.Guid. dr["MatchedTo"] is DBNull and dv[0]["UniqueID"] contains a Guid. Another note is looking in the locals it looks like dr["MatchedTo"] IS assigned the Guid.
>>
>>Any ideas?
>>
>>Thanks
>>
>>Richard
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform