I need to connect C# with SQL Server database using. My Computer Name is "LKW15480", using "SQL Server" is "LKW15480\SQLEXPRESS", DB Name is "DB1". Computer Login "Administrator" Error is "The 'configuration' element is not declared". Please Can you help me?
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>`
</startup>
<connectionString>
<add name="cn"
connectionString="DataSource=LKW15480\SQLExpress;
Initial Catalog=DB1;
User ID=Administrator;"
ProvideName="System.Data.sqlClient"/>
</connectionString>
</configuration>
I am Learning about C# and SQL. I need Connect SQL Data Base and Filtering the data between two datetime.
web.configfile before asking a question. It's invalid. Try this: elmah.io/tools/config-validator