how to connect database connectivity in dotNET? if suppose
SQL server?and also MS access?

Answer Posted / guest

in web.config file
<configuration>

<appSettings>
<add key="SqlCon" value="Data
Source=winserver;initial
Catalog=cieflnew;uid=cieflnew;pwd=cieflnew; Connection
Lifetime=0;Max Pool Size=10000;Min Pool Size=0;Connection
Reset=false;Pooling=true;Persist Security Info=False"/>
</appSettings>
<system.web>
and in code behind
Sql cmd= new Sql command(Query here,con);
cmd.executenonquery();

Is This Answer Correct ?    23 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is iis? Have you used it?

779


what user controls are and what server controls are and the differences between the two.

1821


What is an anonymous method?

775


Tell us why do we use the “using” statement?

749


How is .net core cross platform?

862


What is implement a generic action in webapi?

973


What is managed code in .NET?

866


What are the deferred execution and the immediate execution in linq?

793


What are nullable types in .NET

867


Describe difference between inline and code-behind?

874


Explain how to rename a table using sql queries?

774


How can I tell if .net 3.5 is installed?

748


Where does the gac exist ?

779


What relationship is between a process, application domain, and application?

786


can any one tel me the complete Testing Procedure of any one simple PROJECT i mean either web/windows based application?

1702