February 22, 2007 at 6:15 pm
I've noticed that if I omit the "data source" attribute in the Connection String, the dataSource will still work as long as I have the "initial catalog" listed like this:
initial catalog=webserver2007
If I omit the server/machine name does it look at the host server by default?
Also, if the "data source" attribute is needed should it be the machine name or ???
Both of these work (which is preferred?):
data source=machineName;initial catalog=myDatabase
data source=www.myDomain.com;initial catalog=myDatabase
Thanks.
February 26, 2007 at 8:00 am
This was removed by the editor as SPAM
February 28, 2007 at 9:32 am
I'm pretty sure it looks at localhost first.
February 28, 2007 at 5:37 pm
Re: the machine name, it's probably up to you. Clearly your organisation is using DNS. This gives you the advantage of being able to change which server holds the data without having to change your datasource - provided *all* the other attributes are the same. If you anticipate moving your data and don't want to update the datasource, use the DNS name. In any case, I'd probably still use the DNS name in either case.
Keep in mind that datasources can be shared, so there may not be many to change if you need to move data.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply