Each of the programming steps listed in the topics listed below provide an example, using a section of code taken from the Open Data Services sample gateway application. Complete code and additional comments are available in the sample gateway application provided with Open Data Services or in the listing provided in Sample Application-Gateway Server.
The sample gateway application demonstrates how to access a remote data source on behalf of a client application. The gateway application accesses a SQL Server database as if it were a remote data source. To connect to this data source, the gateway application's event handlers use the data source's native client interface, which in this case is the DB-Library client API.
Now see the following:
Handling ODS Library Errors and Server Messages
Connecting to a Remote Database
Handling a Remote Stored Procedure Event
Receiving Results from a Remote Database
When building your own application to access another data source, use other interfaces as appropriate, such as Windows NT – based client APIs for other relational database products or C-language routines to access custom data sources.