DB Connection Issue

Topics: General Discussion Forum, July and December Releases Forum
Aug 27, 2007 at 8:43 AM
I am stuck on exercise #10 of the Hands-on Lab. When I run the client and it seems I have a DB connection issue. I have spent hours trying to figure it out and I am stuck:

"The requested database CohoWinery is not defined in configuration."

Any ideas?
Aug 27, 2007 at 10:56 AM
I'm far from an expert but couldn't you try and run 'Service Factory (Data Access) > Add Database Connection' on the Host application?

There should be something like this in your configuration node in web.config:
<connectionStrings>
<add name="CohoWinery" connectionString="Data Source=SERVERNAME;Initial Catalog=CohoWinery;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>

or perhaps this is linking to the wrong database :s You could try and test the connection in the 'add DB connection ' wizard.
Aug 27, 2007 at 11:48 AM
I have what you stated - I even ran the solution in the "completed" folder and got the same error - leading me to believe it is a local config issue.
Aug 27, 2007 at 12:24 PM
The completed solution has a different connectionstring as well (and Identifier). Can you view your database etc in your SQL Server Management Studio? perhaps the script to install the database wasn't executed properly. I had to run it twice since the first time it gave errors. You could try and open the database in Visual Studio by doing 'Data > Add New Datasource' in the top menu. If you can connect there I'm guessing it isn't anything local.
Aug 28, 2007 at 4:17 AM
Understood - used the EntLib Config tool to update the string & test the connection.