Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Evaluation Exception with Guids
Message
De
23/02/2007 19:35:34
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Database:
MS SQL Server
Divers
Thread ID:
01198445
Message ID:
01198497
Vues:
7
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform