[Mono-dev] TDS RPC patch
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 Nagappan A [EMAIL PROTECTED] 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 Index: Mono.Data.Tds/Mono.Data.Tds/TdsMetaParameter.cs === --- Mono.Data.Tds/Mono.Data.Tds/TdsMetaParameter.cs (revision 77105) +++ Mono.Data.Tds/Mono.Data.Tds/TdsMetaParameter.cs (working copy) @@ -194,7 +194,10 @@ switch (Value.GetType ().ToString ()) { case System.String: - return ((string) value).Length; + int len = ((string)value).Length; + if (TypeName == nvarchar || TypeName == nchar || TypeName == ntext) + len *= 2; + return len ; case System.Byte[]: return ((byte[]) value).Length; } @@ -203,45 +206,91 @@ private int GetSize () { - if (IsNullable) { - switch (TypeName) { - case bigint: - return 8; - case datetime: - return 8; - case float: - return 8; - case int: - return 4; - case real: - return 4; - case smalldatetime: - return 4; - case smallint: - return 2; - case tinyint: - return 1; - } + switch (TypeName) { + case decimal: + return 17; + case uniqueidentifier: + return 16; + case bigint: + case datetime: + case float: + case money: + return 8; + case int: + case real: + case smalldatetime: + case smallmoney: + return 4; + case smallint: + return 2; + case tinyint: + case bit: + return 1; + /* + case nvarchar : + */ + case nchar : + case ntext : + return size*2 ; } return size; } + 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); + default : + return ((byte[]) Value); + } + } + internal TdsColumnType GetMetaType () { switch (TypeName) { case binary: - return TdsColumnType.Binary; + return TdsColumnType.BigBinary; case bit: + if (IsNullable) + return TdsColumnType.BitN; return TdsColumnType.Bit; + case bigint: + return TdsColumnType.IntN; case char: return TdsColumnType.Char; + case money: + if (IsNullable) +
[Mono-dev] [PATCH] binding
Hi, It is a patch for binding class. regards, duff binding patch.patch Description: Binary data ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Debugger
Usable? I'm using the debugger from svn and when i try to debug a simple app (without thread... or something like that) i get : mdb ./bin/Debug/SendToFT.exe -r Mono Debugger (mdb) r Starting program: ./bin/Debug/SendToFT.exe Cannot load symbol file `/home/hubert/Projects/SynchroPassPremium/SendToFT/bin/Debug/log4net.dll.mdb': Could not find file /home/hubert/Projects/SynchroPassPremium/SendToFT/bin/Debug/log4net.dll.mdb. EXCEPTION: System.ArgumentException: Cannot compare addresses from different domains AddressDomain (0:) and AddressDomain (0:global) at Mono.Debugger.TargetAddress.check_domains (TargetAddress a, TargetAddress b) [0x0001e] in /home/hubert/mono/debugger/interface/TargetAddress.cs:95 at Mono.Debugger.TargetAddress.op_Equality (TargetAddress a, TargetAddress b) [0x0] in /home/hubert/mono/debugger/interface/TargetAddress.cs:146 at Mono.Debugger.Backends.SingleSteppingEngine.throw_exception (TargetAddress stack, TargetAddress exc, TargetAddress ip) [0x00031] in /home/hubert/mono/debugger/backend/SingleSteppingEngine.cs:920 at Mono.Debugger.Backends.SingleSteppingEngine.ProcessChildEvent (Mono.Debugger.Backends.ChildEvent cevent) [0x000c1] in /home/hubert/mono/debugger/backend/SingleSteppingEngine.cs:252 at Mono.Debugger.Backends.SingleSteppingEngine.ProcessEvent (Int32 status) [0x00295] in /home/hubert/mono/debugger/backend/SingleSteppingEngine.cs:214 at (wrapper remoting-invoke-with-check) Mono.Debugger.Backends.SingleSteppingEngine:ProcessEvent (int) at Mono.Debugger.Backends.ThreadManager.engine_thread_main () [0x000ce] in /home/hubert/mono/debugger/backend/ThreadManager.cs:310 The only lib i use is log4net... Le mardi 08 mai 2007 à 01:54 -0400, Miguel de Icaza a écrit : Hey, I installed Mono with the Linux installer for x86 (ftp://www.go-mono.com/archive/1.2.3.1/linux-installer/2/mono-1.2.3.1_2- installer.bin), and mdb seems to be included there. What's this then? Ah, nice. I just do not think we have made any official releases recently. Harald -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Miguel de Icaza Sent: Sonntag, 06. Mai 2007 16:45 To: pablosantosluac Cc: mono-devel-list@lists.ximian.com Subject: Re: [Mono-dev] Debugger Hello, Is it installed with the latest prerelease? I will try it asap. It is only available from the debugger module on SVN. Miguel - Original Message - From: Miguel de Icaza [EMAIL PROTECTED] To: pablosantosluac [EMAIL PROTECTED] Cc: mono-devel-list@lists.ximian.com Sent: Sunday, May 06, 2007 6:33 AM Subject: Re: [Mono-dev] Debugger Hello, What is the debugger current status? It is working, and we hope that people test it with real code, send us feedback and help us improve it. We have reached the point where we think it is usable, but the only way of knowing if it is, is if people give us feedback. Miguel. Pablo ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Ce message et les �ventuels documents joints peuvent contenir des informations confidentielles. Au cas o� il ne vous serait pas destin�, nous vous remercions de bien vouloir le supprimer et en aviser imm�diatement l'exp�diteur. Toute utilisation de ce message non conforme � sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite. Les communications sur internet n'�tant pas s�curis�es, l'int�grit� de ce message n'est pas assur�e et la soci�t� �mettrice ne peut �tre tenue pour responsable de son contenu. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Debugger on Windows
I have to agree with Jonathan. Mono on Windows is a good way to see if a MS .NET app will work on Mono. This is especially true for windows developers who are not familiar with Linux but who would like to see their application or web site running on Linux. If they see it running on Mono on Windows, they may feel more confident to installing linux or a downloading the suse vm and try their app there. --- Jonathan Chambers [EMAIL PROTECTED] wrote: I'm sending a catch all email to try and get some information on being able to use the mono debugger on windows. I'll give some motivation first (based on where I work). Generally, people using .Net will work on Windows. They'll then try their program on mono on Windows to verify that their program runs. If they have a problem, there is currently two approaches it seems: 1) Add Console.WriteLine's to their program and hopefully track down the problem 2) Try bringing their app to Linux and debugging there 1 is painful especially when coming from a Visual Studio background. 2 requires the user to have a Linux box or VMWare image handy. They must also be adept enough to get the environment setup to debug. I think they'll have to either convert their pdb files to mdb format, or build app on mono. Both of these is a non-trivial amount of effort for a new mono user (and maybe even for me ;-)). So, I'm investigating adding a third option, 3) Debugging mono on Windows. I'll just ask a couple of questions. 1) What work is needed to get the debugger working on managed code compiled by mono on windows? 2) Is 1) possible without adding support for native debugging (I assume adding support for native/mixed mode debugging will take more effort) 3) What about formats? If I am on windows, I have probably compiled by managed code and my native code in VS (not mono and gcc). The managed code debugging info can be converted between formats AFAIK, but the unmanaged would be more difficult assuming that would even be attempted. MS provides debugging APIs, but I have no clue whether they could be wrapped and adapted to mono debugger. 4) Exposure I assume would be command line - some sort of IDE (Sharpdevelop, MonoDevelop, or just a quick and dirty Winforms UI for debugging not a full featured IDE) - the ultimate would be integration into VS with a Debug with mono option. I'm sure I'll get enough info from those questions to start with. The only other question I'll ask is, Is this worth the effort? Since I don't know the effort required, I currently think it's worth it ;-). If it's not I'll forget the idea and hack on something else. Thanks, Jonathan ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Debugger on Windows
Hi folks, Well, IMHO what we all DO need is a decent debugger on Linux. If I just had a debugger I would start developing with MonoDevelop today on Linux, and I guess most people would do the same Then we would be all day testing MonoDevelop, the compiler, the debugger and so on and so on... And this IS GOOD for Mono, much better than having some sort of replacement on Windows. By the way porting an app to Linux will take some effort, ok, but what Mono gives is a real opportunity to do it and still develop with C#, the framework and so on... which is great! C# and the entire framework is IMHO the best development platform ever... let's have it on Linux with the only big piece is missing... a debugger!! I agree having it on Windows would help, but please... first on Linux! --pablo - Original Message - From: Daniel Morgan [EMAIL PROTECTED] To: Jonathan Chambers [EMAIL PROTECTED]; mono-devel mono-devel-list@lists.ximian.com Sent: Thursday, May 10, 2007 3:15 PM Subject: Re: [Mono-dev] Debugger on Windows I have to agree with Jonathan. Mono on Windows is a good way to see if a MS .NET app will work on Mono. This is especially true for windows developers who are not familiar with Linux but who would like to see their application or web site running on Linux. If they see it running on Mono on Windows, they may feel more confident to installing linux or a downloading the suse vm and try their app there. --- Jonathan Chambers [EMAIL PROTECTED] wrote: I'm sending a catch all email to try and get some information on being able to use the mono debugger on windows. I'll give some motivation first (based on where I work). Generally, people using .Net will work on Windows. They'll then try their program on mono on Windows to verify that their program runs. If they have a problem, there is currently two approaches it seems: 1) Add Console.WriteLine's to their program and hopefully track down the problem 2) Try bringing their app to Linux and debugging there 1 is painful especially when coming from a Visual Studio background. 2 requires the user to have a Linux box or VMWare image handy. They must also be adept enough to get the environment setup to debug. I think they'll have to either convert their pdb files to mdb format, or build app on mono. Both of these is a non-trivial amount of effort for a new mono user (and maybe even for me ;-)). So, I'm investigating adding a third option, 3) Debugging mono on Windows. I'll just ask a couple of questions. 1) What work is needed to get the debugger working on managed code compiled by mono on windows? 2) Is 1) possible without adding support for native debugging (I assume adding support for native/mixed mode debugging will take more effort) 3) What about formats? If I am on windows, I have probably compiled by managed code and my native code in VS (not mono and gcc). The managed code debugging info can be converted between formats AFAIK, but the unmanaged would be more difficult assuming that would even be attempted. MS provides debugging APIs, but I have no clue whether they could be wrapped and adapted to mono debugger. 4) Exposure I assume would be command line - some sort of IDE (Sharpdevelop, MonoDevelop, or just a quick and dirty Winforms UI for debugging not a full featured IDE) - the ultimate would be integration into VS with a Debug with mono option. I'm sure I'll get enough info from those questions to start with. The only other question I'll ask is, Is this worth the effort? Since I don't know the effort required, I currently think it's worth it ;-). If it's not I'll forget the idea and hack on something else. Thanks, Jonathan ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] TDS RPC patch
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=getsearch=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-- signature.asc Description: This is a digitally signed message part ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Problem with Mono in Fedora 6
Hi, I'm still stuck with Mono in Fedora 6. All modules (mono-1.2.3.1, mono-basic-1.2.3.1, libgdiplus-1.2.3, xsp-1.2.3 and mod_mono-1.2.1) were recompile and now I get this in apache error log is this: System.IO.FileNotFoundException: File or assembly name mod-mono-server, Version=1.2.3.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, or one of its dependencies, was not found. File name: mod-mono-server, Version=1.2.3.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string) at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string) at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x0] at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x0] at Mono.WebServer.ApplicationServer.GetApplicationForPath (System.String vhost, Int32 port, System.String path, Boolean defaultToRoot) [0x0] at (wrapper remoting-invoke-with-check) Mono.WebServer.ApplicationServer:GetApplicationForPath (string,int,string,bool) at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x0] at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x0] If I type mod-mono-server in the console, it runs with no problem. What is apache looking for? In the console I get: mod-mono-server Enter Listening on: /tmp/mod_mono_server Root directory: /root Hit Return to stop the server. Thanks, Marco Castro ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list