You might want to try and use ADO to ocnnect to a sql server.
Dim rs AS NEW ADODB.Recordset. You will also need to have a connectstring,
connect="DataSource=ServerName;Provider=sqloledb.1;Password=user;User ID=user;Initial Catalog=databasename".
Once you have your ado object declared and the connect string established you will exec a sql statement like this,
rs.open "sql statement here", connect