[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference abbott::visual_basic

Title:Microsoft Visual Basic
Moderator:TAMARA::DFEDOR::fedor
Created:Thu May 02 1991
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2565
Total number of notes:10453

2488.0. "Default Server Name of DSN?" by DELNI::DUNCAN () Tue Feb 04 1997 17:42

    
    Does anyone have a VB example that, after making an RDO connection to
    an ODBC DSN, is able to determine the Server Name associated with that
    DSN?
    
    The rdoConnections.Connect property returns the DSN, ID, PW, & DB
    but it leaves out what I need - the Server Name. I want to use this
    name to pass it as a parameter to the Connect method of the SQL Server
    object (of the SQL OLE Library) so I can get username and password of
    the established NT/SQL "trusted" connection (ie, one where the user did 
    not have to enter a username and password).
    
    Thanks.
    
    - Phil
    
T.RTitleUserPersonal
Name
DateLines
2488.1clarificationDELNI::DUNCANTue Feb 04 1997 17:456
    
    in case it was unclear, the RDO Connect property, for a trusted
    connection, does not return the Username & Password, hence my needing
    to use SQL Object's Connect method to access that info (but the latter
    Connect method requires the Server Name string).
    
2488.2the envelopeDELNI::DUNCANThu Feb 06 1997 11:278
    
    For anyone who might need to know in the future, I figured out a way.
    
    Create an RDO resultset with this SQL:
    		
    		"Select @@SERVERNAME