I'm using this code to get data from database, but I get an error: "Connection string property has not been initialized."
web.config:
<?xml version="1.0"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/></system.web>
<connectionStrings>
<add name="PjesmeConn" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\domains\webfilozofa.net\db\Pjesme.mdb;"></add>
</connectionStrings>
</configuration>
web page:
sConn = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["PjesmeConn"].ConnectionString;
web.config:
<?xml version="1.0"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/></system.web>
<connectionStrings>
<add name="PjesmeConn" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\domains\webfilozofa.net\db\Pjesme.mdb;"></add>
</connectionStrings>
</configuration>
web page:
sConn = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["PjesmeConn"].ConnectionString;