So we can guess you're working in Visual Studio 2008?
This is the same as connecting to a local database: use a connection string.
If you know the IP address (or have DNS resolution) and have credentials on the remote DB server to access the database, this is all you need.
You can establish a connection to the database server from the Server Explorer in VS.
For details on connection strings (to any type of database) visit
ConnectionStrings.com[
^].
Cheers.