Using odbcping to Verify a Connection

You can use the odbcping utility to check whether ODBC is properly installed by connecting to a server using the ODBC SQL Server driver. This utility is a 32-bit application that is stored in the \MSSQL\BINN directory. To verify ODBC connectivity, from a command prompt, type:

odbcping /Sservername /Ulogin_id /Ppassword

where

servername
Is the name of a server you will connect to.
login_id
Is a valid login ID for that server.
password
Is the password for that login ID.

If the ODBC connection is established, this message is displayed:

CONNECTED TO SQL SERVER
  

If the ODBC connection cannot be established, this message is displayed:

COULD NOT CONNECT TO SQL SERVER
  

the following func

For more information about connecting to a data source, see Chapter 8, Functions:

SQLBrowseConnect

SQLConnect

SQLDriverConnect