Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Evaluation Exception with Guids
Message
 
À
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:
01198729
Vues:
7
The code that was actually generating the error was the filter being reevaluated (Hence the EvaluationException) and there was an ISNULL() comparing a Guid and an integer. The code below works now that I'm converting the guid to strings instead.

Richard

>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
State of Florida, DCF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform