Switch to standard view 
  Sybase logo

Required Software


  1. Start Visual Studio.
  2. Select File > New > Project.
  3. From the 'New Project' dialog, choose Visual C# > ASP.NET Web Application.
  4. Name the project 'Sample', and save it to a known location of your choice.
  5. Click OK. This will automatically generate the project content, including a Default.aspx web page.
  6. Open the Default.aspx web page in design mode, by double-clicking the file from the Solution Explorer, and then clicking on the Design tab located to the bottom of the editor.
  7. From the Toolbox, double-click on DataList to add the control to the web page.
  8. Click on the > button located to the top-right of the DataList, to expose the task menu. From the Choose Data Source list, choose >New data source…>. This will bring up the Data Source Configuration Wizard.
  9. Select Database, and give it an ID of 'SADemoDB'. Click OK.
  10. In the dialog that follows, either choose an existing data connection, or to connect to the sample database, click the New Connection… button. Set the Data source to SQL Anywhere (SQL Anywhere 11), and choose the ODBC Data Source name as 'SQL Anywhere 11 Demo'. Use 'dba' as the User ID, and 'sql' as the Password. Click OK.
  11. Click Next > to accept the connection and parameters, and then click Next > again to use the default name of ConnectionString.
  12. In the dialog that follows, choose Customers as the table, and select the Surname, GivenName, and CompanyName fields. Click Next >.
  13. You can test the query to ensure that all parameters have been set correctly by pressing the Test Query button. Click Finish. Visual studio will automatically create a table in the DataList control.
  14. Hit F5 to view the hosted page. Visual studio will host the page in a development server, and launch Internet Explorer. The resulting web page should look like this:

Back to Top
© Copyright 2010, Sybase Inc.