Connection of Sybase to .Net and SSRS

  • The connection of Sybase to SSRS was made in the project using the Sybase ASE ODBC driver. This driver needs to be installed.
  • After installation, the next step is to create an ODBC data source for Sybase. This can be done by adding a new system data source under ODBC datasources in the Administrative tools of Control Panel
  • If the creation is successful the Data Source name will appear in the list of System Data Sources in SSRS.

System Data sources over Machine Data sources

  • It’s very important to note the creation of System Data Source and not Machine Data Source under ODBC data sources. In case of a machine data source remote deployment and calling of reports is not possible and will throw a “Data source not found error”

Calling Stored Procedures in Sybase

  • Sybase stored procedures can be called by connecting to Sybase using the Sybase ASE ODBC Driver
  • The stored procedures can be called by using the Exec <SP name> ?,?,?
  • with the number of prompts equivalent to the number of input parameters
  • The parameter prompts must be mapped correctly to the parameters in the dataset.

Drawback of calling Sybase Stored Procedures from SSRS

  • SSRS throws an error if the Sybase SP called has ‘integer’ input parameters
  • The parameter should be converted to ‘char’ in the Sybase SP to solve the problem

Connection of .Net to DB2

  • As the project used web services to connect to the Sybase database, the connection string was set in the web config file of the .Net application.
  • The same was used to create a connection instance wherever required in the .Net code.

Related Posts

  1. DB2 with DotNet and SQL Server Reporting Services
  2. Ad hoc Reporting using SQL Server Reporting Services 2005
  3. SQL Server 2000 Maintenance Jobs Failed with Error 22029
  4. Guidelines for Testing Database Level Application
  5. ASP.Net Developers Checklist – Security Checklist

Tags: , , ,

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>