Oct 27, 2006 02:40 PM|shados|LINK
You could say that. What I mean, is that the actual SQL Server software needs to be installed on the same machine. It wouldn't be in your app. It would be on the machine...the administrator has to do it... You know, has in take a CD labeled "SQL Server 2005
XYZ Edition", pop it in the CD rom, and install it.
If it isn't there, (or if its using SQL Server 2000 or earlier), all attempts to attach the MDF file will fail: how can it attach itself to a software thats not there? Whats common, is that your host has 2 (or more) physical machines. One that runs SQL Server,
and one that runs IIS (ASP.NET). In that scenario, the whole "attach MDF file" deal won't work. At all. You'll have to change your connection string to use an IP address, use SQL Management Studio (or whatever tool or method your host provide), and then its
a case by case scenario. One thing is 100% sure though: if the SQL Server is on a different physical machine, an MDF file in your app_data folder will NOT WORK (at least not in a typical scenario).
In opposition: At my last job, our SQL Server 2005 and IIS were on the same machine. I copy and pasted my web app folder to a web application folder, typed in the URL...and POOF, it worked. That was -it-. That is the scenario VWD's -default- is good for.
Because it is -amazingly rare- in an enterprise scenario (and yes, shared hosts are counted here), this methodology will not work. Everything else about VWD will be peachy. The -only- difference, is that you'll have to get your database on your host the "standard"
way (and the way just about everyone using database servers, as opposed to database files, have been doing for over a decade), and use a tool like SQL Management Studio to do it. Then change the connection string accordingly, and you're good to go. If you
need help with that, after consulting your host, people here will be happy to help you. However, it will be for a totally different thread, as it IS a different problem.