[System.Net] Add support for .pac proxy config scripts on mac
[mono.git] / mcs / class / System.Data / System.Data.SqlClient.jvm / SqlConvert.cs
index 3772eacbc5e496c1d35ccaf35cf9592ba6b40aa0..17d9db29cafd730fa10593855ff60039c307a3cb 100644 (file)
@@ -1,33 +1,33 @@
 //\r
 // System.Data.SqlClient.SqlConvert\r
 //\r
-//
-// Authors:
-//     Konstantin Triger <kostat@mainsoft.com>
-//     Boris Kirzner <borisk@mainsoft.com>
-//     
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//\r
+// Authors:\r
+//     Konstantin Triger <kostat@mainsoft.com>\r
+//     Boris Kirzner <borisk@mainsoft.com>\r
+//     \r
+// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)\r
+//\r
+\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
 //\r
 \r
 using System;\r
@@ -51,33 +51,33 @@ namespace System.Data.SqlClient
                {\r
                        // FIXME : other java.sql.Type\r
                        // Types.ARRAY\r
-                       if(Types.BIGINT == jdbcType) return SqlDbType.BigInt;
-                       if(Types.BINARY == jdbcType) return SqlDbType.Binary;
-                       if(Types.BIT == jdbcType) return SqlDbType.Bit;
-                       if(Types.BLOB == jdbcType) return SqlDbType.Binary;
-                       // Types.BOOLEAN
-                       if(Types.CHAR == jdbcType) return SqlDbType.Char;
-                       if(Types.CLOB == jdbcType) return SqlDbType.Binary;
-                       if(Types.DATE == jdbcType) return SqlDbType.DateTime;
-                       if(Types.DECIMAL == jdbcType) return SqlDbType.Decimal;
-                       // Types.DISTINCT
-                       if(Types.DOUBLE == jdbcType) return SqlDbType.Float;
-                       if(Types.FLOAT == jdbcType) return SqlDbType.Float;
-                       if(Types.INTEGER == jdbcType) return SqlDbType.Int;
-                       // Types.JAVA_OBJECT
-                       if(Types.LONGVARBINARY == jdbcType) return SqlDbType.Image;
-                       if(Types.LONGVARCHAR == jdbcType) return SqlDbType.Text;
-                       // Types.NULL
-                       if(Types.NUMERIC == jdbcType) return SqlDbType.Decimal;
-                       if(Types.REAL == jdbcType) return SqlDbType.Real;
-                       // Types.REF
-                       if(Types.SMALLINT == jdbcType) return SqlDbType.SmallInt;
-                       // Types.STRUCT
-                       if(Types.TIME == jdbcType) return SqlDbType.Timestamp;
-                       if(Types.TIMESTAMP == jdbcType) return SqlDbType.Timestamp;
-                       if(Types.TINYINT == jdbcType) return SqlDbType.TinyInt;
-                       if(Types.VARBINARY == jdbcType) return SqlDbType.VarBinary;
-                       if(Types.VARCHAR == jdbcType) return SqlDbType.VarChar;
+                       if(Types.BIGINT == jdbcType) return SqlDbType.BigInt;\r
+                       if(Types.BINARY == jdbcType) return SqlDbType.Binary;\r
+                       if(Types.BIT == jdbcType) return SqlDbType.Bit;\r
+                       if(Types.BLOB == jdbcType) return SqlDbType.Binary;\r
+                       // Types.BOOLEAN\r
+                       if(Types.CHAR == jdbcType) return SqlDbType.Char;\r
+                       if(Types.CLOB == jdbcType) return SqlDbType.Binary;\r
+                       if(Types.DATE == jdbcType) return SqlDbType.DateTime;\r
+                       if(Types.DECIMAL == jdbcType) return SqlDbType.Decimal;\r
+                       // Types.DISTINCT\r
+                       if(Types.DOUBLE == jdbcType) return SqlDbType.Float;\r
+                       if(Types.FLOAT == jdbcType) return SqlDbType.Float;\r
+                       if(Types.INTEGER == jdbcType) return SqlDbType.Int;\r
+                       // Types.JAVA_OBJECT\r
+                       if(Types.LONGVARBINARY == jdbcType) return SqlDbType.Image;\r
+                       if(Types.LONGVARCHAR == jdbcType) return SqlDbType.Text;\r
+                       // Types.NULL\r
+                       if(Types.NUMERIC == jdbcType) return SqlDbType.Decimal;\r
+                       if(Types.REAL == jdbcType) return SqlDbType.Real;\r
+                       // Types.REF\r
+                       if(Types.SMALLINT == jdbcType) return SqlDbType.SmallInt;\r
+                       // Types.STRUCT\r
+                       if(Types.TIME == jdbcType) return SqlDbType.DateTime;\r
+                       if(Types.TIMESTAMP == jdbcType) return SqlDbType.DateTime;\r
+                       if(Types.TINYINT == jdbcType) return SqlDbType.TinyInt;\r
+                       if(Types.VARBINARY == jdbcType) return SqlDbType.VarBinary;\r
+                       if(Types.VARCHAR == jdbcType) return SqlDbType.NVarChar;\r
                        return SqlDbType.Variant;\r
                }\r
 \r
@@ -108,7 +108,7 @@ namespace System.Data.SqlClient
                                }\r
                                case TypeCode.SByte: return SqlDbType.TinyInt;\r
                                case TypeCode.Single: return SqlDbType.Float;\r
-                               case TypeCode.String: return SqlDbType.VarChar;\r
+                               case TypeCode.String: return SqlDbType.NVarChar;\r
                                case TypeCode.UInt16: return SqlDbType.SmallInt;\r
                                case TypeCode.UInt32: return SqlDbType.Int;\r
                                case TypeCode.UInt64: return SqlDbType.BigInt;\r