Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot perform '>=' operation on System.String and Syste
Message
From
10/11/2005 17:15:55
Keith Payne
Technical Marketing Solutions
Florida, United States
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01067413
Message ID:
01067458
Views:
15
>I've recompiled an existing .NET 1.1 application with VS.NET 2005 on .NET 2.0. No compile errors, but at run time I get
>
>
>Cannot perform '>=' operation on System.String and System.DateTime
>The line of code referenced is
>dtNews.DefaultView.RowFilter = "NewsDate >= #" + DateTime.Today.ToString() + "#";
>
>
>NewDate is a field from an XML file as follows:
>
>
><?xml version="1.0" encoding="utf-8" ?>
><News>
><NewsItem>
>    <NewsDate>26/07/2005</NewsDate>
>    <Message>***WebECP will be down tonight from 9pm-10pm for enhancements***</Message>
>  </NewsItem>
>  <NewsItem>
>    <NewsDate>15/10/2005</NewsDate>
>    <Message>Clinical customers can now be given access to a screen which
 lists of all devices in their area currently being inspected or repaired. 
Site WebECP contacts, please contact Evan for implementation details and 
issues.</Message>
>  </NewsItem>
></News>
>
Evan,

The first thing that comes to mind is that the implicit type conversion options are set differently. Check Option Strict in the 2005 project versus 2003. You can also set Option Strict at the top of the source code file.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform