When setting the logon parameters in your code, are you setting both the server and the database? For an Oracle connection you only need to set one of them (server, I think) for MS SQL Server you need to set both - Server is the name of the machine or the cluster, Database is the name of the specific database on that server.
-Dell