Wrox Programmer Forums
|
BOOK: Professional ASP.NET Design Patterns
This is the forum to discuss the Wrox book Professional ASP.NET Design Patterns by Scott Millett; ISBN: 978-0-470-29278-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET Design Patterns section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 3rd, 2010, 06:34 AM
Registered User
 
Join Date: Dec 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default QueryTranslators and international characters

Im trying out the code in Chapter 7 and the library sample project.

The method CreateQueryAndObjectParameters() creates new ObjectParameters(). This fails with international characters:

This one does work: new ObjectParameter("test", 1)
This one throws an error: new ObjectParameter("täst", 1)

The problem is when the first parameter includes Swedish characters like å, ä, ö. I get the following error message:
The specified parameter name 'täst' is not valid. Parameter names must begin with a letter and can only contain letters, numbers, and underscores. Parameter name: name

Why doesn’t this work? It seems strange if international characters are not supported! Any suggestions or is it by design?

Great book by the way ...

/Stefan
 
Old December 9th, 2010, 09:51 AM
elbandit's Avatar
Wrox Author
 
Join Date: May 2007
Posts: 107
Thanks: 10
Thanked 17 Times in 15 Posts
Default

Hi Moguls,

Thanks for buying the book! :0)

So "täst" is a property of one of entities? Hmmm not sure I think you would have to ask the Entity Framework team about that one.

I am currently in the process of redesigning the query object to use Linq expression trees rather than my hand rolled solution so this might solve your issues. This will also alleviate the need for a query translator as well.

Check out the project page http://aspnetdesignpatterns.codeplex.com/, I will update this post when I get the new source code up which shouldn't be too long now.

Cheers
Scott





Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove First and Last Characters from String if it Contains Those Characters DoriftuEvo Excel VBA 9 September 22nd, 2009 09:01 AM
VB6 and XML File with International Characters mishi XML 5 December 13th, 2004 02:19 PM
VB6 and XML File with International Characters mishi Pro VB 6 0 December 13th, 2004 12:27 PM
International Text Chris Beach C# 2 May 24th, 2004 01:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.