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 are .net functions?
What is the difference between reference type and value type?
State the differences between the dispose() and finalize().
What is concurrency? How will you avoid concurrency when dealing with dataset?
How anonymous method is different from a lambda expression?
What is the difference between function and stored procedure?
How inheritance works in .net?
What is your observations between vb.net and vc#.net?
Differentiate between 'DataSet' and 'SQLDataReader' in ADO.NET?
Please explain what is the difference between constants and read-only variables?
Compare client server application with n-tier application
What is a web service in .net?
Name the classes that are introduced in the system.numerics namespace.
How to get the number after decimal point in .net?
What are the types of jit?