Hi, I am Sumit Gupta. I am a .Net Developer with about 4 years of experience. I have built various applications for both Desktop & Web besides designing Wrapper classes for managing Multi-threading. I would like to share the concept of ADO.NET with you all.
ADO.NET Overview
ADO.NET provides consistent access to data sources such as SQL Server and XML, and to data sources exposed through OLE DB and ODBC. Data-sharing consumer applications can use ADO.NET to connect to these data sources and retrieve, handle, and update the data that they contain.
Connected Architecture of ADO.NET
The architecture such as ADO.net, in which connection must be opened to access the data retrieved from database, is called as connected architecture. Connected architecture is built on the classes’ connection, command, data reader and transaction.
Connection: The purpose of connection is to just establish a communication channel to the database, connection itself would not transfer any data automatically.
Command:After establishing a connection to a data source, you can execute commands and return results from the data source using a DbCommand object. You can create a command using one of the command constructors for the .NET Framework data provider you are working with. Constructors can take optional arguments.
Data Reader: Data Reader is used to store the data retrieved by command object and make it available for .NET application. Data in Data Reader is read only and within the Data Reader you can navigate only in forward direction and it also only one record at a time.
To access one by one record from the Data Reader, call Read() method of the Data Reader whose return type is bool. When the next record was successfully read, the Read() method will return true otherwise false.
Transaction: Transactions are groups of database commands that execute as a package. Using a transaction gives your application the ability to abort (roll back) all changes executed from within the transaction if any errors occur during any part of the transaction process.
Disconnected Architecture of ADO.NET
Data Adapter: Data Adapter is used to transfer the data between database and dataset. It has commands like select, insert, update and delete. Select command is used to retrieve data from database and insert, update and delete commands are used to send changes to the data in dataset to database. It needs a connection to transfer the data.
Command Builder: By default, data adapter contains only the select command and it doesn’t contain insert, update and delete commands. To create insert, update and delete commands for the data adapter, command builder is used. It is used only to create these commands for the data adapter and has no other purpose.
DataSet: Dataset is used to store the data retrieved from database by data adapter and make it available for .net application.
To fill data into dataset fill() method of data adapter is used and has the following syntax> Da.Fill(Ds,”TableName”);
When fill method was called, data adapter had opened a connection to database, had executed select command, had stored the data retrieved by select command in to dataset and had also immediately closed the connection.
As connection to database was closed, any changes to the data in dataset wasn’t directly sent to the database and changes were made only in the dataset. To send changes made to data in dataset to the database, Update() method of the data adapter is used that has the following syntax> Da.Update(Ds,”Tablename”);
When Update method is called, data adapter will again open the connection to database, executes insert, update and delete commands to send changes in dataset to database and immediately closes the connection. As connection is opened only when it is required, the connection will be automatically closed when it was not required, this architecture is called disconnected architecture.
DataView: DataView is a view of table available in DataSet. It is used to find a record, sort the records and filter the records. By using DataView, you can also perform insert, update and delete as in case of a DataSet.A dataset can contain data in multiple tables.
So this is how ADO.NET provides consistent access to data sources such as SQL Server and XML, and to data sources exposed through OLE DB and ODBC.
Thanks for reading. Please share your ideas on our talk on ado.net here.
40 comments
wtofnnvgjn
July 22, 2020 at 8:03 pm
Muchas gracias. ?Como puedo iniciar sesion?
Wally
August 22, 2020 at 7:14 am
You could certainly see your enthusiasm in the article you write.
The arena hopes for more passionate writers such as you
who are not afraid to say how they believe.
Always go after your heart.
Judi poker online
August 22, 2020 at 1:00 pm
I am in fact happy to read this blog posts which includes plenty of helpful facts, thanks for providing these
kinds of statistics.
live chat
August 23, 2020 at 2:52 pm
wonderful points altogether, you just gained a logo new reader.
What might you recommend about your submit that you just made
a few days in the past? Any certain?
Seymour
August 23, 2020 at 6:21 pm
Hello, its pleasant article about media print, we all know media
is a fantastic source of facts.
Battery Machine| Battery Equipment|Lithium Battery Lab Line|Battery Laboratory Rerearch Equipment|Lithium Battery Materials|Battery Assembly Equipment and Material|Battery Assembly Line|Coin Cell Equipment
August 24, 2020 at 10:41 am
Definitely believe that which you said. Your favorite justification appeared
to be on the internet the easiest thing to be aware of.
I say to you, I certainly get irked while people consider worries that they just don’t know about.
You managed to hit the nail upon the top and defined out the whole thing without having side-effects , people
can take a signal. Will likely be back to get more.
Thanks
Lionel
August 24, 2020 at 1:51 pm
Touche. Solid arguments. Keep up the amazing spirit.
business
August 24, 2020 at 3:10 pm
Thank you for the good writeup. It in fact was
a amusement account it. Look advanced to far added agreeable from you!
By the way, how could we communicate?
Battery Machine| Battery Equipment|Lithium Battery Lab Line|Battery Laboratory Rerearch Equipment|Lithium Battery Materials|Battery Assembly Equipment and Material|Battery Assembly Line|Coin Cell Equipment
August 24, 2020 at 6:36 pm
My partner and I stumbled over here from a different website and thought I may
as well check things out. I like what I see so i am just following you.
Look forward to finding out about your web page repeatedly.
Maurice Kinsel
August 25, 2020 at 8:01 am
Wonderful beat ! I would like to apprentice while you amend your site, how can i subscribe for a blog site? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear idea
Leonie
August 26, 2020 at 9:41 am
Having read this I believed it was rather enlightening. I appreciate you finding the time and effort
to put this content together. I once again find myself spending way too much time
both reading and posting comments. But so what, it was still worthwhile!
newest movies out
August 27, 2020 at 2:42 am
I know this web site offers quality depending articles or reviews and extra
information, is there any other web site which offers these kinds
of information in quality?
watch newest movies out
August 27, 2020 at 3:15 am
I’m now not certain the place you are getting your info, however
good topic. I needs to spend a while learning
more or figuring out more. Thanks for wonderful info I used to be on the lookout for
this info for my mission.
Tegan
August 27, 2020 at 6:35 am
I have to thank you for the efforts you have put
in writing this blog. I’m hoping to see the same high-grade content by you in the future as well.
In truth, your creative writing abilities has inspired
me to get my very own site now 😉
how to watch free putlocker movies
August 30, 2020 at 8:58 pm
After checking out a number of the blog articles on your web site, I truly like your technique of writing a blog.
I book-marked it to my bookmark webpage list and
will be checking back in the near future. Please visit my
web site as well and let me know your opinion.
how to watch free putlocker movies
August 31, 2020 at 10:22 pm
I think the admin of this site is truly working hard in support of his web page, since here every data is quality based information.
thegildedmint.com
September 1, 2020 at 12:29 pm
Howdy! Someone in my Facebook group shared this site with us so I came
to give it a look. I’m definitely loving the information. I’m book-marking and will be tweeting this to
my followers! Superb blog and terrific design and style.
الخليج العربي
September 13, 2020 at 5:38 pm
Way cool! Some very valid points! I appreciate you penning
this post and also the rest of the website is extremely good.
Bigg Boss 14 Online
September 15, 2020 at 4:36 pm
My spouse and I stumbled over here different page and thought I should check things out.
I like what I see so now i am following you. Look forward to looking
at your web page again.
curso completo manutenção e conserto de celular
September 19, 2020 at 3:30 pm
I am really impressed with your writing skills and also with the layout
on your weblog. Is this a paid theme or did you customize it yourself?
Anyway keep up the excellent quality writing, it’s
rare to see a great blog like this one nowadays.
camo phone case
November 10, 2020 at 7:29 am
I loved as much as you will receive carried out right here.
The sketch is attractive, your authored subject matter
stylish. nonetheless, you command get got an nervousness over that you wish be delivering the following.
unwell unquestionably come further formerly
again as exactly the same nearly a lot often inside case you shield this hike.
Dannypep
November 10, 2020 at 3:12 pm
does cialis lower your blood pressure cialis for sale cialis headaches afterwards
average cost of cialis prescription
November 11, 2020 at 11:15 pm
average cost of cialis prescription https://buszcentrum.com/
joe biden we just did
November 12, 2020 at 2:20 am
You really make it seem so easy with your presentation however I in finding this topic to be actually one thing which I think I’d never understand.
It sort of feels too complex and very large for me.
I’m having a look forward in your next publish, I’ll try to get the dangle
of it!
Feel free to visit my web page; joe biden we just did
ampicillin 250mg
November 17, 2020 at 8:10 am
ampicillin 250mg https://amoxycillin1st.com/
hydroxychloroquine generic manufacturers
November 21, 2020 at 12:53 am
hydroxychloroquine generic manufacturers https://hydroxychloroquine.webbfenix.com/
ivermectin for humans ebay
November 28, 2020 at 12:48 am
ivermectin for humans ebay https://ivermectin.mlsmalta.com/
Edwarddurne
December 1, 2020 at 8:31 am
erectial disfunction https://sildenafilxxl.com/ where to buy viagra online
old dapoxetine safe
December 2, 2020 at 6:40 am
old dapoxetine safe https://ddapoxetine.com/
virtual medical visits
December 3, 2020 at 11:00 am
virtual medical visits https://medpills.bee-rich.com/
online prescription for ed meds
December 4, 2020 at 4:49 pm
online prescription for ed meds https://tadalafili.com/
vidalista women
December 5, 2020 at 12:29 am
vidalista women https://vidalista40mg.mlsmalta.com/
is cialis professional really cialis
December 7, 2020 at 2:36 am
is cialis professional really cialis https://wisig.org/
hydroxychloroquine 200mg coronavirus
December 7, 2020 at 4:39 am
hydroxychloroquine 200mg coronavirus https://hydroxychloroquinee.com/
inhalers for copd walmart
December 7, 2020 at 12:06 pm
inhalers for copd walmart https://amstyles.com/
카지노사이트
December 8, 2020 at 9:39 am
Well, that depends on what you’d like to achieve from your blogging efforts.
Would you like influential bloggers to notice you and follow you on Twitter?
카지노사이트
호텔카지노
December 8, 2020 at 10:06 am
Would you like to be invited to participate in expert roundups, conferences, and other great opportunities?
Would you like to receive emails out-of-the-blue from super-cool and talented people asking you to write for them?
호텔카지노
온라인카지노
December 8, 2020 at 10:25 am
Would you like to have your work published on one of the biggest, baddest blogs in the world?
It isn’t easy, and it doesn’t happen overnight. And, clearly, great comments alone won’t catapult you to world domination.
온라인카지노
MasonVor
December 10, 2020 at 2:34 am
cialis generic availability real cialis online with paypal cheapest cialis web prices
MasonVor
December 10, 2020 at 10:38 am
zithromax 500 can you buy zithromax over the counter in canada cheap zithromax pills