>>When I try that code for the pubs database the connection fails, get the message
Not associated with a trusted SQL server connection.
==> You may not be using a trusted connection, you can set it by right clicking your SQL Registration from the enterprise manager, and set the authentication method.
This is very confusing as I am using my admin username and password in the ODBC wizard. I even changed my default database to the one I wanted and it isn't even displayed in the list.>>
===>
You have to make it sure that you set the permission properly after you created your database..
I will try to post again tomorrow how to solve your connection problem problem.