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>Bugs with Mono or the data provider should be reported
22 in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
23 do not have Bugzilla user account, it is free
25 create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
33 <li>Able to connect to Sybase databases</li>
35 <li>SQL commands can be executed
36 via ExecuteNonQuery() of a SybaseCommand.</li>
38 <li>SQL aggregates can be executed and a single row and single column
39 result can be retrieved via ExecuteScalar() of a SybaseCommand</li>
41 <li>SQL queries can be executed via ExecuteReader() and results
42 can be retrieved via SybaseDataReader.</li>
44 <li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
45 in a SybaseDataReader</li>
47 <li>Data can be filled in a DataTable in a DataSet via a SybaseDataAdapter</li>
53 <li>Connection timeouts is being developed now.
55 <li>Needs more testing...
62 <li>Have a working mono and mcs installed</li>
64 <li>Have access to a Sybase database
65 or either download it:
67 <li><a href="http://www.sybase.com/downloads">Sybase</a></li>
71 <li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
72 named SqlTest.cs and you could use this as a basis for your test.</li>
74 <li>Has a connection string format:
76 Server=hostname;Database=databaseName;User ID=userid;Password=password
79 <li>The Server part can be used two ways:
81 <li>hostname - "Server=MYHOST"</li>
82 <li>hostname,port - "Server=MYHOST,1533"</li>
90 using Mono.Data.SybaseClient;
94 public static void Main(string[] args)
96 string connectionString =
100 "Password=mypassword;";
102 dbcon = new SybaseConnection(connectionString);
104 IDbCommand dbcmd = dbcon.CreateCommand();
106 "SELECT fname, lname " +
108 dbcmd.CommandText = sql;
109 IDataReader reader = dbcmd.ExecuteReader();
110 while(reader.Read()) {
111 string FirstName = (string) reader["fname"];
112 string LastName = (string) reader["lname"];
113 Console.WriteLine("Name: " +
114 FirstName + " " + LastName);
127 <li>Building C# Example:
129 <li>Save the example to a file, such as, TestExample.cs</li>
132 mcs TestExample.cs -r System.Data.dll \
133 -r Mono.Data.SybaseClient.dll
136 <li>Build on Windows via Cygwin:
138 mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
140 -lib:C:/cygwin/home/MyHome/mono/install/lib \
141 -r System.Data.dll -r Mono.Data.SybaseClient.dll
146 <li>Running the Example: