Avatar of zrancidr
zrancidr asked on

Basic difference between using an AccessDataSource and an OleDBConnection to connect to an Access Database

I know Access isn't the best DB to use with ASP.NET, but it's what I've been assigned to work with.

I'm definitely in the learning process at the moment, so I have a basic question.

I was used to creating an OleDBConnection object and connecting to the database that.  I would then create a command object and a reader object and then databound it to a GridView Object.

However, most texts I have seen use an AccessDataSource and just set the DataFile attribute to the database path and then set the GridViews DataBase ID to link up with that AccessDataSource.

My question is what exactly are the differences between these two variants?  Is the AccessDataSource simply the newer way to accomplish the same task?  If not, what are the advantages of each method?
.NET ProgrammingDatabasesASP.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Thanks!  Just wanted to check that it would produce the same output (especially since I'm only going to be using an access database)
Your help has saved me hundreds of hours of internet surfing.