[Firebird-net-provider] [Fwd: problem in .NET provider]

2007-10-28 Thread Carlos Guzmán Álvarez



 Mensaje original 
Asunto: problem in .NET provider
Fecha:  Sat, 20 Oct 2007 15:34:00 +0200
De: Peter Turcan <[EMAIL PROTECTED]>
Para:   [EMAIL PROTECTED]



Hello Carlos!

For first, thank you for your great work on .NET Firebird provider!
I have found problem in it, when there is Turkish regional settings.
Problem is in program FbConnectionString.cs, where you are initializing 
HashTable this way:

Hashtable synonyms = new
Hashtable(StringComparer.CurrentCultureIgnoreCase);

but I don't know why, this hash table, especially
GetKey procedure in FbConnectionStringBuilder.cs
doesn't work.

So in FbConnectionString.cs I have changed StringComparer property to:
Hashtable synonyms = new Hashtable(StringComparer.OrdinalIgnoreCase);

and everything works ok.
(see source from version 2.0.1, but in the latest 2.1.0RC2 it is still 
the same code)


I think, it will be fine to incude this patch into full version
all the best,
Peter



--
Carlos Guzmán Álvarez
Vigo-Spain

Blog: http://carlosga.wordpress.com/
FirebirdClient  : http://www.firebirdsql.org/
XMPP Client : http://code.google.com/p/xmppclient/
ohloh   : http://www.ohloh.net/accounts/4138

/*
 *  Firebird ADO.NET Data provider for .NET and Mono 
 * 
 * The contents of this file are subject to the Initial 
 * Developer's Public License Version 1.0 (the "License"); 
 * you may not use this file except in compliance with the 
 * License. You may obtain a copy of the License at 
 * http://www.firebirdsql.org/index.php?op=doc&id=idpl
 *
 * Software distributed under the License is distributed on 
 * an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either 
 * express or implied. See the License for the specific 
 * language governing rights and limitations under the License.
 * 
 *  Copyright (c) 2004-2005 Carlos Guzman Alvarez
 *  All Rights Reserved.
 */

using System;
using System.Collections;
using System.Data;
using System.Globalization;
using System.Text.RegularExpressions;

using FirebirdSql.Data.Common;

namespace FirebirdSql.Data.FirebirdClient
{
internal sealed class FbConnectionString
{
#region · Static Fields ·

public static readonly Hashtable Synonyms = GetSynonyms();

#endregion

#region · Static Methods ·

// This is somethig that should be needed in .NET 2.0
// for use with the DbConnectionOptions or 
DbConnectionString classes.
private static Hashtable GetSynonyms()
{
//  Hashtable synonyms = new 
Hashtable(StringComparer.CurrentCultureIgnoreCase);
Hashtable synonyms = new 
Hashtable(StringComparer.OrdinalIgnoreCase);

synonyms.Add("data source", "data source");
synonyms.Add("datasource", "data source");
synonyms.Add("server", "data source");
synonyms.Add("host", "data source");
synonyms.Add("port", "port number");
synonyms.Add("port number", "port number");
synonyms.Add("database", "initial catalog");
synonyms.Add("initial catalog", "initial catalog");
synonyms.Add("user id", "user id");
synonyms.Add("userid", "user id");
synonyms.Add("uid", "user id");
synonyms.Add("user", "user id");
synonyms.Add("user name", "user id");
synonyms.Add("username", "user id");
synonyms.Add("password", "password");
synonyms.Add("user password", "password");
synonyms.Add("userpassword", "password");
synonyms.Add("dialect", "dialect");
synonyms.Add("pooling", "pooling");
synonyms.Add("max pool size", "max pool size");
synonyms.Add("maxpoolsize", "max pool size");
synonyms.Add("min pool size", "min pool size");
synonyms.Add("minpoolsize", "min pool size");
synonyms.Add("character set", "character set");
synonyms.Add("charset", "character set");
synonyms.Add("connection lifetime", "connection 
lifetime");
synonyms.Add("connectionlifetime", "connection lifetime");
synonyms.Add("timeout", "connection timeout");
synonyms.Add("connection timeout", "connection 
timeout");
synonyms.Add("connectiontimeout", "connection timeout");
synonyms.Add("packet size", "packet size");
synonyms.Add("packetsize", "packet size");
synonyms.Add("role", "role name");
synonyms.Add("role name", "role name");
synonyms.Add("f

Re: [Firebird-net-provider] [Fwd: problem in .NET provider]

2007-10-28 Thread Jiri Cincura
Maybe better to use InvariantCultureIgnoreCase IMO.
-- 
Jiri {x2} Cincura (Microsoft Student Partner)
http://blog.vyvojar.cz/jirka/ | http://www.ID3renamer.com

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] [Fwd: problem in .NET provider]

2007-10-28 Thread Carlos
Hello:

> Maybe better to use InvariantCultureIgnoreCase IMO.

Huuummm ok we can do the change on the devel version and see how it works,

I'm thinking on release a new version of the 2.5 sources, for that i
will need to modify the nant build file to avoid the compilation of
the Entity Framework support, hope i will do it in this weekend ( or
in the beggining of the next week )


-- 
Carlos Guzmán Álvarez
Vigo-Spain

Blog: http://carlosga.wordpress.com/
FirebirdClient  : http://www.firebirdsql.org/
XMPP Client : http://code.google.com/p/xmppclient/
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider