Author: anagappan
Date: 2007-09-11 02:55:41 -0400 (Tue, 11 Sep 2007)
New Revision: 85620

Modified:
   trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/ChangeLog
   
trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandBuilderTest.cs
   
trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcDataReaderTest.cs
Log:
2007-09-11  Nagappan A  <[EMAIL PROTECTED]>

        * OdbcCommandBuilderTest.cs (DefaultPropertiesTest): QuotePrefix
        and QuoteSuffix are not supported in 2.0 profile, so moved them
        under 1.0 profile.

        * OdbcDataReaderTest.cs (Bug82560Test): Added new test case for
        the bug # 82560. Thanks to [EMAIL PROTECTED] (amc) for providing
        this test case.
        (Bug82135Test): Fixed connection open.



Modified: 
trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/ChangeLog   
2007-09-11 06:36:17 UTC (rev 85619)
+++ trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/ChangeLog   
2007-09-11 06:55:41 UTC (rev 85620)
@@ -1,3 +1,14 @@
+2007-09-11  Nagappan A  <[EMAIL PROTECTED]>
+
+       * OdbcCommandBuilderTest.cs (DefaultPropertiesTest): QuotePrefix
+       and QuoteSuffix are not supported in 2.0 profile, so moved them
+       under 1.0 profile.
+
+       * OdbcDataReaderTest.cs (Bug82560Test): Added new test case for
+       the bug # 82560. Thanks to [EMAIL PROTECTED] (amc) for providing
+       this test case.
+       (Bug82135Test): Fixed connection open.
+
 2007-07-31  Nagappan A  <[EMAIL PROTECTED]>
 
        * OdbcDataReaderTest.cs (Bug82135Test): ODBC SQLExecDirect

Modified: 
trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandBuilderTest.cs
===================================================================
--- 
trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandBuilderTest.cs
   2007-09-11 06:36:17 UTC (rev 85619)
+++ 
trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandBuilderTest.cs
   2007-09-11 06:55:41 UTC (rev 85620)
@@ -150,9 +150,9 @@
                        OdbcCommandBuilder cb = new OdbcCommandBuilder ();
 #if NET_1_0
                        Assert.AreEqual 
(ConflictOption.CompareAllSearchableValues, cb.ConflictDetection);
-#endif
                        Assert.AreEqual ("", cb.QuotePrefix, "#5");
                        Assert.AreEqual ("", cb.QuoteSuffix, "#6");
+#endif
 #if NET_2_0                            
                        Assert.AreEqual (".", cb.CatalogSeparator, "#2");
                        //Assert.AreEqual ("", cb.DecimalSeparator, "#3");

Modified: 
trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcDataReaderTest.cs
===================================================================
--- 
trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcDataReaderTest.cs
       2007-09-11 06:36:17 UTC (rev 85619)
+++ 
trunk/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcDataReaderTest.cs
       2007-09-11 06:55:41 UTC (rev 85620)
@@ -100,7 +100,7 @@
                        IDbConnection conn = new OdbcConnection (
                                                
ConnectionManager.Singleton.ConnectionString);
                        try {
-                               ConnectionManager.Singleton.OpenConnection ();
+                               conn.Open ();
                                OdbcCommand cmd = new OdbcCommand ("create 
table odbcnodatatest (ID int not null, Val1 text)",
                                                                   
(OdbcConnection) conn);
                                cmd.ExecuteNonQuery ();
@@ -113,7 +113,36 @@
                        }
                }
                
+               private static void DoExecuteNonQuery (OdbcConnection conn, 
string sql) {
+                       OdbcCommand cmd = new OdbcCommand (sql, conn);
+                       cmd.ExecuteNonQuery();
+               }
+  
+               private static void DoExecuteScalar(OdbcConnection conn, string 
sql) {
+                       OdbcCommand cmd = new OdbcCommand (sql, conn);
+                       cmd.ExecuteScalar();
+               }
+
                [Test]
+               public void Bug82560Test ()
+               {
+                       IDbConnection conn = new OdbcConnection (
+                                               
ConnectionManager.Singleton.ConnectionString);
+                       try {
+                               conn.Open ();
+                               DoExecuteNonQuery ((OdbcConnection) conn, 
"CREATE TABLE odbc_alias_test" + 
+                                                  "(ifld INT NOT NULL PRIMARY 
KEY, sfld VARCHAR(20))");
+                               DoExecuteNonQuery ((OdbcConnection) conn, 
"INSERT INTO odbc_alias_test" +
+                                                  "(ifld, sfld) VALUES (1, 
'1111')");
+                               DoExecuteScalar ((OdbcConnection) conn, "SELECT 
A.ifld FROM odbc_alias_test " +
+                                                "A WHERE A.ifld = 1");
+                               DoExecuteNonQuery ((OdbcConnection) conn, "DROP 
TABLE odbc_alias_test");
+                       }finally {
+                               conn.Close ();
+                       }
+               }
+
+               [Test]
                public void FindZeroInToStringTest ()
                {
                        IDbConnection conn = 
ConnectionManager.Singleton.Connection;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to