Hello all
I am relatively good with ASP.net, been making lots of websites and logins
etc etc for a while now but always using Access as a data source.
Time has come to move up to SQL Server mainly because my new venture is
massive and many people will be updating data at the same time.
I have created my website on my computer, I have created a SQL database, all
works perfectly.
Now I want to copy the website to the webserver, the Data source is a mdf
file. With access it was easy, just copy it to the server. However this does
not work with SQL data source.
Has anyone any tips for how to do this, or a link that could help? The
server is Small Business Server with all the updates, and it has a SQL Server
Service Manager installed.
What do I need to do to get it to work. The only thing I can see that might
be a problem is in the webconfig it refers to SQLEXPRESS as the database,
should it be different?
Many thanks
James
Peter Bromberg [C# MVP] - 11 Dec 2007 17:50 GMT
You need to copy the MDF (and optional LDF log file) to the Database server
and use SQL Management studio to ATTACH the database. Then change your
connection string to not use User Instance, e.g.
server=myserver;database=mydatabase;uid=myuser;pwd=mypassword
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
> Hello all
>
[quoted text clipped - 21 lines]
> Many thanks
> James