Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
[mono.git] / web / sybase
index fbbee798e119d23b2baa387cde8b6fd37868007c..85deca1a67cd8afd5c38660f407d40e5db0d6f81 100755 (executable)
        <li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
        
        <li>Uses TDS Protocol Version 5.0</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
        <li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
        named SqlTest.cs and you could use this as a basis for your test.</li>
        
+       <li>Has a connection string format:
+<pre>
+ Server=hostname;Database=databaseName;User ID=userid;Password=password
+</pre>
+       </li>
+       <li>The Server part can be used two ways:
+               <ul>
+                       <li>hostname - "Server=MYHOST"</li>
+                       <li>hostname,port - "Server=MYHOST,1533"</li>
+               </ul>
+       </li>
+               
        <li>C# Example:
 <pre>
  using System;
           "Password=mypassword;";
        IDbConnection dbcon;
        dbcon = new SybaseConnection(connectionString);
+       dbcon.Open();
        IDbCommand dbcmd = dbcon.CreateCommand();
        string sql = 
             "SELECT fname, lname " + 
        dbcmd.CommandText = sql;
        IDataReader reader = dbcmd.ExecuteReader();
        while(reader.Read()) {
-            string FirstName = reader["fname"];
-            string LastName = reader["lname"];
+            string FirstName = (string) reader["fname"];
+            string LastName = (string) reader["lname"];
             Console.WriteLine("Name: " + 
                  FirstName + " " + LastName);
        }