iNET Interactive - Online Advertising Agency
          
   Home    Authors    About    Login    Contact Us
   Search:   
Advanced Search     
  Articles

  ASP (26)
  ASP.NET (19)
  C and C++ (4)
  CFML (2)
  CGI and Perl (16)
  Flash (2)
  Java (7)
  JavaScript (28)
  PHP (92)
  MySQL (13)
  MSSQL (3)
  HTML (34)
  SEO (9)
  Visual Basic (12)
  CSS (13)
  SSI (5)
  XML (12)
  C# (14)

  Developer News

May 11, 2008
Improving accessibility for motor impaired users
WebDevTips UK
 
May 11, 2008
10 ways to orientate users on your site
WebDevTips UK
 
May 11, 2008
Web Design Clinic - Rros restoration camp 2006
About
 
May 10, 2008
The Moods of Facebook
About
 
May 9, 2008
CSS 1 properties are a great start
About
 
May 9, 2008
Reader Question: How do you get fancy fonts?
About
 
Courtesy of moreover.com
 
Want to receive new articles via e-mail? Click here!
/Home /XML

Connecting and Accessing Data through ADO.NET 

  Views:    12463
  Votes:    7
by Pawan Bangar 10/09/04 Rating: 

Synopsis:

Microsoft's ADO.NET technology offers a solution to many of the problems associated with data access.
Pages: firstback1 forwardlast
The Article

Program Example:

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.

Pages: firstback1 forwardlast

Similar/related articles:


 
  Sponsors