New Posts New Posts RSS Feed: Prism Explorer-How to Install NorthwindEF Database
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Prism Explorer-How to Install NorthwindEF Database

 Post Reply Post Reply
Author
BruceKu View Drop Down
Newbie
Newbie
Avatar

Joined: 09-Jan-2010
Location: Canada
Posts: 7
Post Options Post Options   Quote BruceKu Quote  Post ReplyReply Direct Link To This Post Topic: Prism Explorer-How to Install NorthwindEF Database
    Posted: 09-Jan-2010 at 1:50pm
==========  September 28, 2010 Update =========
 
Prism Explorer no longer uses NorthwindEF ... it uses the NorthwindIB tutorial database installed with DevForce 2010.
The documentation still says "NorthwindEF" ... which mistake will be corrected.
 
Ward's post below on 9/28/2010 describes the change.
 
========== Original Post ==================
 
I have brought down the Prism Explorer example and unzipped it into a directory.
I can open the project with VS2008. It runs.
 
But when I do Get All customers Query I get the error
 
A network-related or instance specific error occured while establishing a connection to SQL Server. The server was not found or inaccessible.
 
I use mainly SQL Server 2008 express on this machine so I did my usual for projects
1. Add App_Data directory for web project
2. added the existing dtatabase (as supplied in download) to directory
 
It is visible.
 
Checked in app.config (below)
 

<connectionStrings>

<add name="NorthwindEFEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.;Initial Catalog=NorthwindEF;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />

</connectionStrings>

seems to suggest data source is local.
 
Got same error.
 
This is probably simple but I am not seeing how to connect to the database.
 
Can you help?
 
Thanks!
 
Bruce


Edited by WardBell - 28-Sep-2010 at 10:18am
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jan-2010 at 3:26pm

Hi Bruce-

Glad you found the NorthwindEF database in the zip; too many people miss this step!
 
Next I'd check to see if you can reach the DB. You can try while inside Visual Studio. From the EntityFramework model designer  (right click and pick "Update from Database"). Or via the Visual Studio "Server Explorer" window. 
 
Sometimes "Data Source=." doesn't work when "Data Source=localhost" does.
 
Then I'd look at permissions. There shouldn't be a problem because you're running as your windows identity but it's worth confirming that you can read the database at all.
 
Oops. I think I just saw it. You said you only have "SQL Server 2008 express " on your machine? If so, you need to change the "Data Source=." to "Data Source=YOUR-MACHINE-NAME\sql8express" or some such thing. Use a connection string that you know works as an example.
 
As a general practice, I test the connection string outside the application first.
 
Of course there is always a chance that something else is amiss. I hope this fixes your problem and that you can report good news.
 
W
Back to Top
BruceKu View Drop Down
Newbie
Newbie
Avatar

Joined: 09-Jan-2010
Location: Canada
Posts: 7
Post Options Post Options   Quote BruceKu Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jan-2010 at 9:51am
Thank you Ward for your suggestions.
 
I checked connection to DB both ways (Server Explorer and thru Entity Model ) and both worked.
 
Then I went into web.config and searched for every occurance of 'Data Source' and replaced the . with my
connection string BRUCELAPTOP/SQLEXPRESS
 
Upon saving the web.config, the system ( I assume DevForce) requested to regenerate the model. I let it do so.
 
Then I ran it and the first query Get all customers works fine.
 
Thank you.
 
I am an experienced developer in old technologies (COBOL, etc) but just learning C# and LINQ.
 
I am going to have more questions on how to do some things. Do I post the questions here or can I talk to you directly?
 
Bruce
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jan-2010 at 3:15pm
Bruce, welcome aboard!  Pleased all turned out well.
 
I wish I could talk to everyone directly but just not enough of me to go around :-(
 
Don't know if your whether you are a customer with paid support or using the free version. If the free version, you can post to the forum and we will try to answer your questions in a timely fashion. If you are a customer, you can submit a support request here: http://www.ideablade.com/CustomerSupportRequestForm.aspx
 
Used to write Cobol myself; don't miss it at all.  Cheers, W
 
 
Back to Top
tj62 View Drop Down
Groupie
Groupie
Avatar

Joined: 21-May-2009
Location: Iceland
Posts: 81
Post Options Post Options   Quote tj62 Quote  Post ReplyReply Direct Link To This Post Posted: 28-Sep-2010 at 3:58am
I have searched all over the place but not finding the NorthWindEF database usable for the VS2010 version of PrismExplorer. I have the one used for VS2008 version of PrismExplorer, but that one does not seem to work.

Where in heck do I find the NorhtWindEF for PrismExplorer 2010? Am I blind?
Back to Top
WardBell View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 31-Mar-2009
Location: Emeryville, CA,
Posts: 338
Post Options Post Options   Quote WardBell Quote  Post ReplyReply Direct Link To This Post Posted: 28-Sep-2010 at 10:05am
Oops! PrismExplorer no longer uses NorthwindEF ... and we neglected to tell you. Sorry you wasted your time looking.
 
Prism Explorer now uses NorthwindIB, the tutorial database installed with DevForce.
 
We wanted to reduce the number of steps you need to get going ... and installing another database seemed like unnecessary friction. You can also get NorthwindIB independently from our website [reference needed].
 
The action item for us is to update the documentation to reflect that change.
 
I editted the initiating post to reflect this change so that folks don't have to scroll here to learn of the change.


Edited by WardBell - 28-Sep-2010 at 10:17am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down