Running the sample projects

There are four sample projects included with the SQL Anywhere .NET Data Provider:

  • SimpleCE   A .NET Compact Framework sample project for Windows Mobile that demonstrates a simple listbox that is filled with the names from the Employees table when you click the Connect button.

  • SimpleWin32   A .NET Framework sample project for Windows that demonstrates a simple listbox that is filled with the names from the Employees table when you click the Connect button.

  • SimpleXML   A .NET Framework sample project for Windows that demonstrates how to obtain XML data from SQL Anywhere via ADO.NET.

  • TableViewer   A .NET Framework sample project for Windows that allows you to enter and execute SQL statements.

For tutorials explaining the sample projects, see Tutorial: Using the SQL Anywhere .NET Data Provider.

Note

If you installed SQL Anywhere in a location other than the default installation directory (C:\Program Files\SQL Anywhere 11), you may receive an error referencing the Data Provider DLL when you load the sample projects. If this happens, add a new reference to iAnywhere.Data.SQLAnywhere.dll. There is one version of the Data Provider that supports the .NET Framework 2.0 and later versions. The Data Provider for Windows is located in install-dir\Assembly\v2\iAnywhere.Data.SQLAnywhere.dll. The Data Provider for Windows Mobile is located in install-dir\ce\Assembly.

For instructions on adding a reference to the DLL, see Adding a reference to the Data Provider DLL in your project.