Search
Recommended Products
Related Links


 

 

Informative Articles

Cyber Utopia
Table of Contents I. What is Cyber Utopia? II. Free Internet Services of Today III. Who Owns the Internet? I. What is Cyber Utopia? Cyber Utopia is a non-existent Internet. It’s a place where information can be sent anywhere to anyone in a matter...

Explore the Internet in a Whole New Way
For a long time now Microsoft's Internet Explorer has ruled as 'King of Internet browsers'. Like many of Microsoft's products an initially brutal marketing campaign pushed Internet Explorer into the mainstream's consciousness and from then on it was...

How To Choose A Fire Wall Software Program
In the real world a "fire wall" is a fireproof wall that is built to stop the spread of fire from one part of a building to others. In the Internet world a firewall has a similar purpose in that it stops the spread of harmful viruses and attacks...

Spyware Lurks: Be Aware Of Bonus Software
People buying packaged software should be aware, that may be getting more than they were hoping for, from the software being purchased. The added piece of bonus software bundled with their purchase may contain spyware. People get attracted by the...

The Seamless Internet
http://www.enfish.com/ The hype over ubiquitous (or pervasive) computing (computers everywhere) has masked a potentially more momentous development. It is the convergence of computing devices interfaces with web (or other) content. Years ago -...

 
Connecting and Accessing Data through ADO.NET

Microsoft's ADO.NET technology offers a solution to many of the problems associated with data access.

Accessing data has become a major programming task for modern software programming, both for standardalone applications and for web based applications. Microsoft's ADO.NET technology offers a solution to many of the problems associated with data access.

ADO.NET is an improvement to Microsoft ActiveX Data Objects (ADO). It is a standards-based programming model for creating distributed data-sharing applications. ADO.NET offers several advantages over previous versions of ADO and over other data access components. These benefits fall into the following categories:

Interoperability
Maintainability
Programmability
Performance.
Connecting to a database:
For performing and operation we need to connect to a database. This is done automatically through ADO connection, of which code is associated with VS.net Programming environment.

Connecting Database
sharp1.cs class xyz1 {
public static void


main()
{
try
{
System.Data.ADO.ADOConnection s;
S=new System.Data.ADO.ADOConnection();
System.Console.Writeline("C-Sharp);
}
catch(System.Exception e)
{
System.console.Writeline(e.ToString());
}}}


Above program can be compiled through command line at DOS promot giving command line option as /r:System.Data.Dll

Because the code for ADO.Connection is available at this DLL. The above program consists of an object s resembling as System.ado.adoconnection .

Thus we are creating the object s by the statement:

System.Data.ADO.ADOConnection s;

From the output it is clear that the constructor has thrown no exception, as otherwise catch block would have been executed.

About the Author

Presently working in the capacity of the Technical Director of Birbals, an e-consulting firm based in India dedicated in providing innovative and effective web, Hospitality and consultancy services to public, private and non-profit organizations. Successfully founded Birbals and other IT companies like Ebirbals and SeoBirbals.