Link to home
Start Free TrialLog in
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?
ASKER CERTIFIED SOLUTION
Avatar of WanaBRich
WanaBRich
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zrancidr
zrancidr

ASKER

Thanks!  Just wanted to check that it would produce the same output (especially since I'm only going to be using an access database)