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