Or
Call SQLDriverConnect to use a connection string to connect to SQL Server.
A minimum complete SQL Server connection string has one of two forms:
DSN=dsnname;UID=loginid;PWD=password;
DRIVER={SQL Server};SERVER=server;UID=loginid;PWD=password;
If the connection string is not complete, SQLDriverConnect can prompt for the required information.
Or
Call SQLBrowseConnect multiple times in an iterative fashion to build the connection string and connect to SQL Server.