[Mono-dev] TDS RPC patch

A Nagappan anagappan at novell.com
Fri May 11 07:35:48 EDT 2007


Hi,

Base work of this patch was done by Senganal. Previous Mono ADO.NET
maintainer.

Thanks for reviewing the patch :) Modified Encoding.ASCII.GetBytes to
Encoding.UTF8.GetBytes. This patch should work with MS-SQL 2000 server
too, if possible please verify it ?

Yet to write the ChangeLog ;)

Thanks
Nagappan


Nagappan A <anagappan at novell.com>
Linux Desktop Testing Project - http://ldtp.freedesktop.org
http://nagappanal.blogspot.com

Novell, Inc.
SUSE* Linux Enterprise 10
Your Linux is ready*
http://www.novell.com/linux



>>> 
From: Mirco Bauer <meebey at meebey.net>
To:A Nagappan <anagappan at novell.com>
Date: 05/11/07 1:30 AM
Subject: Re: [Mono-dev] TDS RPC patch
CC:<mono-devel-list at lists.ximian.com>
On Thu, 2007-05-10 at 00:20 -0600, A Nagappan wrote:
> Hi,
>   Attached is TDS / SqlClient RPC patch. Have verified it in my
> environment with MS-SQL 2005 (only). Please verify in your
environment
> and send your feedback.
> 
> Thanks
> Nagappan

I am using MSSQL 2000 on a german Window 2000 Server System, I can't
test your patch, but I am following/reviewing it.

+               internal byte[] GetBytes ()
+               {
+                       byte[] result = {};
+                       if (Value == DBNull.Value || Value == null)
+                               return result;
+
+                       switch (TypeName)
+                       {
+                               case "nvarchar" :
+                               case "nchar" :
+                               case "ntext" :
+                                       return
Encoding.Unicode.GetBytes
((string)Value);
+                               case "varchar" :
+                               case "char" :
+                               case "text" :
+                                       return Encoding.ASCII.GetBytes
((string)Value);

This catches my eye, wouldn't that destroy (remove or replace with
"?")
all non-ASCII (highbit values) from the string? this would be fatal
for
me :)

+                               default :
+                                       return ((byte[]) Value);
+                       }
+               }
+

-- 
Regards,

Mirco 'meebey' Bauer

PGP-Key:
http://keyserver.noreply.org/pks/lookup?op=get&search=0xEEF946C8

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
+++$ E- W+++$ N o? K- w++>! O---- M-
V? PS
PE+ Y- PGP++ t 5+ X++ R tv+ b+ DI? D+ G>++ e h! r->++ y?
------END GEEK CODE BLOCK------

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sqlclient-tds_rpc.patch
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070511/829285dd/attachment.pl 


More information about the Mono-devel-list mailing list