[S] Data source names in Windows

Frank Biedermann (frank@ssabsa.sa.gov.au)
Tue, 24 Mar 1998 10:20:53 +-10-30


Forgive me if this is not in the correct format - this is my first post to this list.

I'm currently using Splus 4.0 Service Pack 3 on a Windows 95 machine, and am
trying to write a function that retrieves data from an SQL server directly and
sticks the result into a data frame. I know I can do this through the menu system
(File->Import Data->From ODBC Connection etc, etc), and I have used
import.data to mirror this functionality manually, but I have two specific problems
at the moment:

1. I can't seem to find a way to retrieve a list of the available data source names
(DSN) except by going through the above menu options. Is there a function that
will return the list of available DSNs (ie the ones listed in the ODBC section of
control panel)? I want to be able to display a dialogue box which to some extent
mimics the above menu selection, and lists the DSNs in a listbox for the user to
select from.

2. The help file listing for import.data is not very useful in one sense as it states for the
argument OdbcConnection: 'required if FileType="ODBC". Encrypted character
string containing ODBC connection string.' I know what an ODBC connection string
looks like (I've used ODBC through Visual Basic before), however, neither the help
file nor the manuals say how to get an encrypted version of this connection string.
(On a positive note I have tried import.data with an unencrypted connection string, and
it works, but this is not very good in terms of security...)

Thanks in advance for any help you're able to provide.

Frank Biedermann
Research Officer (Statistics)
SSABSA
60 Greenhill Rd
Wayville SA 5034
Australia
ph: (+61) 8 8372 7439
fax: (+61) 8 8372 7590

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news