troubleshooting Question

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

Avatar of zrancidr
zrancidr asked on
Databases.NET ProgrammingASP.NET
2 Comments1 Solution353 ViewsLast Modified:
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?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros