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 are the advantages of .net?

730


What is the difference between vb.net and vc#.net?

783


How you apply a theme in whole application in .Net?

833


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

769


Do you know what is .net standard?

819


I was working for software company frm 2005 to 2009. I left job due to recession.I was jobless till dec 09 then i got job in bpo and i am not knowing what to do as my professional experience is with software.give me any suggestion.

1695


Which dll translate xml to sql in internet information server (iis)?

800


Explain about the Common Language Runtime?

814


Where does the gac exist ?

770


Explain the process of compilation in .NET?

836


What are .net functions?

718


Will it go to finally block if there is no exception happened?

738


If I am writing in a language like vb or c++, what are the procedures to be followed to support .net?

790


Using activex control in .net?

752


Why is .net used?

744