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 data providers available in .net to connect to database?

520


What is .net3.0 and .net3.5?

557


How to customize the trace output?

554


Describe the compilation process for .net code?

606


Tell us what do the following acronyms in .net stand for: il, cil, msil, cli and jit?

521






What is the use of immutability?

604


How do you turn off cookies for one page in your site? Give an example.

500


Is there any attempt system for microsoft technology papers?

1299


What is .net technology?

574


What is your observations between vb.net and vc#.net?

537


What is the purpose of IClonable interface in .NET?

604


Can you create instance of a class which has private constructor?

591


What operating systems does the .net framework run on?

556


How do I use the thread pool?

573


Name the classes that are introduced in the system.numerics namespace.

629