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
Tell us the difference between managed and unmanaged code?
What exactly is being serialized when you perform serialization in .net?
Compare client server application with n-tier application
When should I use .net core?
If you are executing these statements in commandobject. Select * from table1; select * from table2? How you will deal result set? 42. How do you sort a dataset.
Why do we use the “using” statement?
What is data type and how many types of data types are in .NET ?
What is a design pattern and what is it for?
Explain me what is the difference between a class and an object, and how do these terms relate to each other?
Write the .net syntax for 'while loop'?
Is it true that objects don't always get destroyed immediately when the last reference goes away?
object is physical and class is logical..here class is not occupying any memory as our definition of class but i got a question then the class where it stores if it is not occupying any memory....
Sql Queries: A Table will be given Omiting Duplicate rows and adding a new column
How can you instantiate a tuple?
what will do to avoid prior case?