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
Difference abstract class and interface in .net?
How to load the contents of an xml file into an xmldocument object?
Explain the difference between the while and for loop.
Explain is the jit an interpreter?
Is there any thread in our .net programs?
Explain what is an anonymous method and how is it different from a lambda expression?
What is assembly in .net?
What does mean by .net framework?
Describe the programming model of a windows service
Explain me what is the difference between an abstract class and an interface?
How is .net able to support a lot of languages?
What is the benefit of .net core?
Can any object be stored in a viewstate in .net?
Explain code access security.
Interop Services?