Wednesday 6 February 2019

An introduction to ADO.NET


ADO.NET is that technology by Microsoft which enables us to connect any .NET application with different type of Database easily and unanimously. thus it acts as a layer between .NET Application and Database as shown in following picture.



Three important classes in ADO.NET frame work are 1) Connection 2) DataAdapter and 3) DataSet. Using objects of these class types in .NET application we can access from database and use the data as per our needs.



Obviously to connect with different type of database we have to use different type of data adapter and connection string.


Thus for understanding the whole thing in a better way we shall try for writing the actual code. To try with databases here are some ready database files of different type having the Same name Contacts and having a single table with name contacts1 with a very small amount of data (5 records)

1) ACCESS Database File                             Contacts.accdb
2) SQL Express Database file                        Contacts.mdf
3) SQL Compact Edition Database file         Contacts.sdf
4) SQLite Database file                                  Contacts.db
5) Excel as Database file                                Contacts.xlsx

And here are the Zip file for VS2012 Solution and VB.NET Project to connect to each type of database.


And here are videos which will explain how to write the code


  


3 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. "As someone who's always been curious about how electrician services work, I can't thank you enough for this blog. It's clear, informative, and incredibly helpful!"
    At Easyfix Electrics, our commitment to excellence and customer satisfaction sets us apart as the premier Electrician in Rose Bay Sydney.

    ReplyDelete
  3. "Thank you for sharing such an informative post about electric services. The detailed explanations really help in understanding the importance of professional electricians."
    Family First Electrical is the leading local provider of electrical services. Our team of Electrician in Balmain is always available to assist you. Please contact us today.

    ReplyDelete