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
What is iis? Have you used it?
what user controls are and what server controls are and the differences between the two.
What is an anonymous method?
Tell us why do we use the “using” statement?
How is .net core cross platform?
What is implement a generic action in webapi?
What is managed code in .NET?
What are the deferred execution and the immediate execution in linq?
What are nullable types in .NET
Describe difference between inline and code-behind?
Explain how to rename a table using sql queries?
How can I tell if .net 3.5 is installed?
Where does the gac exist ?
What relationship is between a process, application domain, and application?
can any one tel me the complete Testing Procedure of any one simple PROJECT i mean either web/windows based application?