At run time I am getting error requested database does not exist in configuration see at Line 19
string con = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["cn"].ConnectionString;
Line 19: Database db = DatabaseFactory.CreateDatabase(con);
Line 20: string sqlcmd = "select * from Movies where MovieID<500";
Line 21: DbCommand dbcommand = db.GetSqlStringCommand(sqlcmd);
In my webconfig i have given required Code in web config
<configSections><section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data"/></configSections>
<connectionStrings><add name="AdventureWorksDB" providerName="System.Data.SqlClient" connectionString="server=localhost;database=AdventureWorks;UID=user;PWD=word;"/><connectionStrings>
<dataConfiguration defaultDatabase="AdventureWorksDB"/>
i have even added required DLL....
i also configured the EnterPrise Library
i defined there required connection string
followed steps in given link http://www.datadirect.com/developer/net/docs/dot-net-daab.pdf.
but of no result ..
can some one tell me