Rexx/SQL

A Rexx interface to SQL databases

Version 2.5

10 October 2006


SQLDATASOURCES(stem name)

Obtains a list of the data sources available. The list of data source names is returned as a compound variable in the stem name

Arguments:

stem name
A stem that will contain the list of data sources.

Returns:
success: a number >= zero.
a value of zero indicates success.

failure: a negative number
Stem variable names set:
stem name.DSN_NAME.n
Data source name
stem name.DSN_DESCRIPTION.n
Data source description

Example:
The following example shows the use of SQLDATASOURCES:
Say "Getting ODBC Data Sources..."
rc = sqldatasources( "!ds." )
Do i = 1 To !ds.dsn_name.0
   Say 'Name:' !ds.dsn_name.i 'Description:' !ds.dsn_description.i
End

The output from the above code sample on my machine is:
Getting ODBC Data Sources...
Name: Visual FoxPro Tables Description: Microsoft Visual FoxPro Driver
Name: Visual FoxPro Database Description: Microsoft Visual FoxPro Driver
Name: MQIS Description: SQL Server
Name: SOLID Description: SOLID ODBC Driver 3.50
Name: EASY1 Description: SQL Server


Copyright © Mark Hessling 1997-2006 <mark@rexx.org>


Return to Table of Contents
Last updated 10 October 2006