I haven't done this recently, but my guess is:

When running your code in Eclipse, the IDE takes care of the SQL-server housekeeping necessary to provide a server and a connection through the...