tags:

views:

41

answers:

1

Hi there,

I create a new console application with using C# and then added my dll to my project's references. My dll has a DB class which has static properties.

 public class DB
 {
     public static Database db = DatabaseFactory.CreateDatabase("ConnectionStringName");

 }

When DB class's properties call, it throw an exception that is 'The requested database (Connection String Name) is not defined in configuration.' I can't create connection, so i can't get fields that i want to see its value.

What can i do?

Thanks in advance

A: 

I read that the ConnectionString should be placed in the app.config of the soloution that is calling the class library (.dll). Source: http://vstoolsforum.com/blogs/vbnet/archive/2009/02/20/the-requested-database-xyz-is-not-defined-in-configuration.aspx

Mantisen