2009-03-28 Sebastien Pouliot <sebastien@ximian.com>
[mono.git] / web / oledb
index 02b151fc05ce6e7675b075a8bae6e3bb872708d7..1dabe6244edd667b6a2b03d01c5cc1fbb4c9cdc5 100755 (executable)
--- a/web/oledb
+++ b/web/oledb
        </li>
        
        <li>Does not support trusted connections</li>
+       
+       <li>Bugs with Mono or the data provider should be reported 
+       in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>.  If you
+       do not have Bugzilla user account, it is free 
+       and easy to 
+       create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
+
+       
 </ul>
        
 ** Current Status
@@ -87,6 +95,7 @@
           "Password=fun2db";
        IDbConnection dbcon;
        dbcon = new OleDbConnection(connectionString);
+       dbcon.Open();
        IDbCommand dbcmd = dbcon.CreateCommand();
        // requires a table to be created named employee
        // with columns firstname and lastname
        dbcmd.CommandText = sql;
        IDataReader reader = dbcmd.ExecuteReader();
        while(reader.Read()) {
-            string FirstName = reader["firstname"];
-            string LastName = reader["lastname"];
+            string FirstName = (string) reader["firstname"];
+            string LastName = (string) reader["lastname"];
             Console.WriteLine("Name: " + 
                  FirstName + " " + LastName);
        }