4 <li>ADO.NET Provider for Sybase SQL Server databases</li>
6 <li>Exists in namespace Mono.Data.SybaseClient and assembly Mono.Data.SybaseClient</li>
8 <li>Created by Tim Coleman</li>
10 <li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
11 <a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
13 <li>Implemented in 100% C#</li>
15 <li>Is similar to the Mono.Data.TdsClient and System.Data.SqlClient providers.</li>
17 <li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
19 <li>Uses TDS Protocol Version 5.0</li>
21 <li>Does not support trusted connections</li>
27 <li>Able to connect to Sybase databases</li>
29 <li>SQL commands can be executed
30 via ExecuteNonQuery() of a SybaseCommand.</li>
32 <li>SQL aggregates can be executed and a single row and single column
33 result can be retrieved via ExecuteScalar() of a SybaseCommand</li>
35 <li>SQL queries can be executed via ExecuteReader() and results
36 can be retrieved via SybaseDataReader.</li>
38 <li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
39 in a SybaseDataReader</li>
41 <li>Data can be filled in a DataTable in a DataSet via a SybaseDataAdapter</li>
47 <li>Connection timeouts is being developed now.
49 <li>Needs more testing...
56 <li>Have a working mono and mcs installed</li>
58 <li>Have access to a Sybase database
59 or either download it:
61 <li><a href="http://www.sybase.com/downloads">Sybase</a></li>
65 <li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
66 named SqlTest.cs and you could use this as a basis for your test.</li>
72 using Mono.Data.SybaseClient;
76 public static void Main(string[] args)
78 string connectionString =
82 "Password=mypassword;";
84 dbcon = new SybaseConnection(connectionString);
85 IDbCommand dbcmd = dbcon.CreateCommand();
87 "SELECT fname, lname " +
89 dbcmd.CommandText = sql;
90 IDataReader reader = dbcmd.ExecuteReader();
91 while(reader.Read()) {
92 string FirstName = reader["fname"];
93 string LastName = reader["lname"];
94 Console.WriteLine("Name: " +
95 FirstName + " " + LastName);
108 <li>Building C# Example:
110 <li>Save the example to a file, such as, TestExample.cs</li>
113 mcs TestExample.cs -r System.Data.dll \
114 -r Mono.Data.SybaseClient.dll
117 <li>Build on Windows via Cygwin:
119 mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
121 -lib:C:/cygwin/home/MyHome/mono/install/lib \
122 -r System.Data.dll -r Mono.Data.SybaseClient.dll
127 <li>Running the Example: