Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


AllNightNerding

411 posts

Ultimate Geek


#38604 1-Aug-2009 21:43
Send private message

So, im workiing on this project at th emoment and I have the ASPNETDB database (The one which does all the login stuff, is a tool that you drag on and the database gets automatically created.

I migrated that .MDF database file to live on a proper SQL Server Database, but the problem I now have is that the program now cant find that database.

I cant figure out how to change the link to point at the SQL database rather than the .MDF file
Does anyone know how to do this?

Im using Visual Studio 2008 and SQL Server 2005 Developer on Server 2003

Thanks in advanced!




-- Divett Enterprises -- The Power Of Tomorrow --

Create new topic
RedJungle
Phil Gale
1108 posts

Uber Geek
+1 received by user: 46

Trusted
Red Jungle
Subscriber

  #241328 1-Aug-2009 22:03
Send private message

If I'm understanding that correctly, then it should be just a matter of updating your SQL connection string in the Web.config

Rather than pointing to the .mdf, you'll want something like this:

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;



casper021
96 posts

Master Geek


  #241684 3-Aug-2009 09:02
Send private message

Here is the connection string from my web.config file on a server connecting to a MSSQL database
name="name" connectionString="Data Source=DBSERVERIP;Initial Catalog=DBNAME;User ID=DBUSERD;password=DBPASSWORD;Trusted_Connection=no;




Ragnor
8279 posts

Uber Geek
+1 received by user: 585

Trusted

  #241828 3-Aug-2009 15:35
Send private message


AllNightNerding

411 posts

Ultimate Geek


  #242307 4-Aug-2009 12:19
Send private message

Does anyone have an example connection string for the ASPNETDB database (The default one when creating the login form)




-- Divett Enterprises -- The Power Of Tomorrow --

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.