Johan Åhlén

Johan Åhlén's blog about life, universe and everything.

StreamInsight - how to solve the "Input string was not in a correct format" bug

Are you running StreamInsight in a non-English speaking country? Then you may have run into the problem of getting the exception "Input string was not in a correct format" from StreamInsight when you try to run a query that contains a non-integer number. The problem is that some countries (like Sweden) use comma as decimal separator instead of a dot and that causes problems with the XML serialization/deserialization within StreamInsight. I've reported this as a bug to Microsoft and you can read more about it here.

Workaround?

Yes, I've found a workaround. You can change the CurrentCulture of your thread just before creating your query templates or calling ToQuery():

Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

After creating your query tempates or instantiating your queries you can change the culture back to your original again if needed.

 

Posted: Jun 04 2010, 09:59 PM by jahlen
Filed under:

Comments

No Comments