[Mono-dev] TDS RPC patch
Mirco Bauer
meebey at meebey.net
Thu May 10 15:56:36 EDT 2007
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
GIT d s-:+ a-- C++ UL++++$ P L++$>+++$ 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 --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070510/3ea22ced/attachment.bin
More information about the Mono-devel-list
mailing list