>When I try that code for the pubs database the connection fails, get the message
>
>Not associated with a trusted SQL server connection.
>
>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.
If you're using SQL Server login, add
"UID=<UserName>;PWD=<Password>;" + ;
to the connection string.
--sb--