BCA / B.Tech 14 min read

ADO.NET in Hindi | ADO.NET क्या है?

Introduction of ADO.NET in Hindi | ADO.NET का परिचय :


  • ADO.NET (ActiveX Data Objects .NET) एक Microsoft द्वारा विकसित डेटा एक्सेस तकनीक है, जो .NET Framework का हिस्सा है। 
  • इसका उपयोग डेटाबेस से डेटा एक्सेस करने और उसे प्रबंधित करने के लिए किया जाता है। ADO.NET डिस्कनेक्टेड आर्किटेक्चर का समर्थन करता है, जो इसे तेज़ और प्रभावी बनाता है। 
  • इसका उपयोग SQL Server, Oracle, OLE DB, और XML डेटा स्रोतों के साथ किया जा सकता है।
  • ADO.NET .NET Framework का एक महत्वपूर्ण हिस्सा है जो डेटाबेस से कुशलतापूर्वक इंटरैक्ट करने की सुविधा देता है।
  • इसके डिस्कनेक्टेड आर्किटेक्चर और ऑब्जेक्ट मॉडल की वजह से यह डेटा को आसानी से हैंडल करने के लिए उपयुक्त है।
  • ADO.NET मुख्य रूप से डेटा रीड करने, लिखने, अपडेट करने और डिलीट करने के लिए उपयोगी है।
ADO.NET in Hindi | ADO.NET क्या है?

Features of ADO.NET in Hindi | ADO.NET की विशेषताएं :

  • डिस्कनेक्टेड आर्किटेक्चर: डेटा को कैश करने और बाद में इसे उपयोग करने की अनुमति देता है।
  • डेटा प्रोवाइडर: डेटा स्रोतों के साथ इंटरफेस करने के लिए अलग-अलग क्लास लाइब्रेरी।
  • XML सपोर्ट: XML के साथ डेटा को पढ़ने और मैनिपुलेट करने की सुविधा।
  • स्केलेबिलिटी: बड़े पैमाने पर डेटा के साथ काम करने में सक्षम।
Data Providers in ADO.NET in Hindi | डेटा प्रोवाइडर्स :

ADO.NET डेटा प्रोवाइडर्स का उपयोग डेटाबेस से कनेक्ट करने और डेटा एक्सेस करने के लिए किया जाता है। प्रत्येक प्रोवाइडर एक विशिष्ट डेटा स्रोत के साथ काम करता है।

Main Data Providers in ADO.NET in Hindi | प्रमुख डेटा प्रोवाइडर्स :

  • SQL Server Data Provider: SQL Server के लिए।
  • Namespace: System.Data.SqlClient
  • OLE DB Data Provider: अन्य OLE DB कम्पेटिबल डेटा स्रोतों के लिए।
  • Namespace: System.Data.OleDb
  • ODBC Data Provider: ODBC कम्पेटिबल डेटा स्रोतों के लिए।
  • Namespace: System.Data.Odbc
  • Oracle Data Provider: Oracle Database के लिए।
  • Namespace: System.Data.OracleClient
ADO.NET Objects in Hindi | ADO.NET ऑब्जेक्ट्स :

ADO.NET में डेटा को हैंडल करने के लिए विभिन्न ऑब्जेक्ट्स हैं।

  • Connection Object: डेटा स्रोत के साथ कनेक्शन बनाता है।
  • उदाहरण: SqlConnection
  • Command Object: SQL कमांड को निष्पादित करता है।
  • उदाहरण: SqlCommand
  • DataReader Object: डेटा को फॉरवर्ड-ओनली तरीके से पढ़ता है।
  • उदाहरण: SqlDataReader
  • DataAdapter Object: डेटा स्रोत और DataSet के बीच ब्रिज का काम करता है।
  • DataSet Object: डिस्कनेक्टेड डेटा कैश करता है।

Program of ADO.NET in Hindi | C# में ADO.NET प्रोग्राम्स :

Reading data from SQL Server in Hindi |  SQL Server से डेटा पढ़ना :

using System;
using System.Data.SqlClient;

class Program
{
    static void Main()
    {
        string connectionString = "Data Source=YOUR_SERVER;Initial Catalog=YOUR_DATABASE;Integrated Security=True";
        string query = "SELECT * FROM Students";

        using (SqlConnection connection = new SqlConnection(connectionString))
        {
            SqlCommand command = new SqlCommand(query, connection);

            connection.Open();
            SqlDataReader reader = command.ExecuteReader();

            while (reader.Read())
            {
                Console.WriteLine($"ID: {reader["ID"]}, Name: {reader["Name"]}, Age: {reader["Age"]}");
            }

            reader.Close();
        }
    }
}


Data Inserting | डेटा इंसर्ट करना :

using System;
using System.Data.SqlClient;

class Program
{
    static void Main()
    {
        string connectionString = "Data Source=YOUR_SERVER;Initial Catalog=YOUR_DATABASE;Integrated Security=True";
        string query = "INSERT INTO Students (Name, Age) VALUES (@Name, @Age)";

        using (SqlConnection connection = new SqlConnection(connectionString))
        {
            SqlCommand command = new SqlCommand(query, connection);
            command.Parameters.AddWithValue("@Name", "Rahul");
            command.Parameters.AddWithValue("@Age", 20);

            connection.Open();
            int rowsAffected = command.ExecuteNonQuery();
            Console.WriteLine($"{rowsAffected} row(s) inserted successfully.");
        }
    }
}

Data Update | डेटा अपडेट करना :

using System;
using System.Data.SqlClient;

class Program
{
    static void Main()
    {
        string connectionString = "Data Source=YOUR_SERVER;Initial Catalog=YOUR_DATABASE;Integrated Security=True";
        string query = "UPDATE Students SET Age = @Age WHERE Name = @Name";

        using (SqlConnection connection = new SqlConnection(connectionString))
        {
            SqlCommand command = new SqlCommand(query, connection);
            command.Parameters.AddWithValue("@Name", "Rahul");
            command.Parameters.AddWithValue("@Age", 21);

            connection.Open();
            int rowsAffected = command.ExecuteNonQuery();
            Console.WriteLine($"{rowsAffected} row(s) updated successfully.");
        }
    }
}

In this Chapter

ADO.NET in Hindi | ADO.NET क्या है?
Introduction of .Net in Hindi
Web Services in Hindi | वेब सर्विसेस हिंदी में
WSDL in Hindi | WSDL हिंदी में
Boxing & Unboxing in ADO.NET in Hindi
CLR in Hindi | CLR क्या है?
Common Types System in Hindi
MSIL in Hindi
Assemblies & Class Libraries in Hindi
Project of .Net in Hindi
What is VB.NET and IDE in Hindi | वीबी.नेट क्या है ?
Intermediate Language in Hindi
Object Orientation in Hindi
Managed Execution in Hindi
Rapid Development in Hindi
Windows Presentation Foundation in Hindi
Whats new For .NET framework 3.5?
Windows Workflow Foundation (WWF) in Hindi
Windows Card Space in Hindi
Windows Communication Foundation in Hindi
How To Install and Use The Visual Studio 2008
How to Working With Visual Studio 2008
Types of Visual Studio 2008 in Hindi
Visual Studio 2008 IDE in Hindi
How To Create Console Application in Hindi
Introduction of C# in .NET in Hindi
Classes of .NET With C# in Hindi
Properties of .NET With C# in Hindi
Structs in C# .NET in Hindi
Delegates & Events in Hindi
Generic Collections in .NET (C#) in Hindi
Type Safety in Hindi
Nullable Types in .NET in Hindi
SQL Connection Object in Hindi
SQL Command in Hindi
LINQ in Hindi | LINQ क्या है?
What is Using Stored Procedures?
Windows Application in .NET in Hindi | Windows Application क्या है?
BCA || .NET with C# 2023 Paper | MDSU Exam Paper
.NET with C# All Important Questions and Answers in Hindi (MDSU)
BCA || .NET with C# 2025 Paper | MDSU Exam Paper