I am not sure whether this is your requirement or not
The ADO way.
If you are trying to connect to a MS SQL Server database, then you don't have to install any additional ODBC drivers. Windows comes pre-installed with MDAC.
Here is the code to connecto to a MS Sql Database
TRY
 oConnection:=CreateObject("ADODB.Connection")
CATCH
 MsgInfo("It seems that your PC does not have MDAC installed OR MDAC is corrupted."+CRLF+;
     "Please contact IT Dept.")
 Return .F.
END
oConnection:ConnectionString:="Provider=SQLOLEDB;server=YourServerIP;database=YourDatabaseName;uid=UserName;pwd=Password"
TRY
 oConnection:Open()
CATCH
 MsgInfo("Failed to Connect to the Database available in the Internet."+CRLF+;
      "Please check whether internet is available in your PC","Unable to connect")
 Return .F.
END
Regards
Anser