BOWWOW, Correct, you can use the above method to "hard code" the site code, or you can manually set it, however, you may have a bigger issue if you are atuomatically detecting the wrong site.
Is the machine in :
a) the correct physical topology with connection to the site server?
b) within the DNS Zone / IP Subnet as that defined on the primary site server.
Neil J Cotton
Technical Consultant