2003-07-10 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
[mono.git] / web / mysql
index 23a83129117c0dd3bb664828c0aec4fcae4e0835..56c5f11295030539380b22e9c7b7b9ccc858c528 100755 (executable)
--- a/web/mysql
+++ b/web/mysql
                </ul>
        </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>
 
  <p><a href="http://www.mysql.com/articles/dotnet/">Exploring MySQL 
@@ -69,6 +75,8 @@
        
        <li>Mono.Data.MySql (deprecated)
                <ul>
+                       <li>Currently, only works with version 3.23.x of MySQL</li>
+               
                        <li>can connect</li>
        
                        <li>can execute non-queries via ExecuteNonQuery()</li>
           "Password=mypassword;";
        IDbConnection dbcon;
        dbcon = new MySQLConnection(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);
        }
@@ -238,15 +247,9 @@ mono TestExample.exe
        
        <li>Has a ConnectionString format: 
 <pre>
- "Server=hostname;" +
- "Database=database;" +
- "User ID=username;" +
- "Password=password"
+ "Server=hostname;Database=database;User ID=username;Password=password"
          (or)
- "host=hostname;" +
- "dbname=database;" +
- "user=username;" +
- "passwd=password"
+ "Host=hostname;Dbname=database;User=username;Passwd=password"
 </pre>
 
        <li>C# Example:
@@ -266,6 +269,7 @@ mono TestExample.exe
           "Password=mypassword;";
        IDbConnection dbcon;
        dbcon = new MySqlConnection(connectionString);
+       dbcon.Open();
        IDbCommand dbcmd = dbcon.CreateCommand();
        // requires a table to be created named employee
        // with columns firstname and lastname