Tuesday, May 22, 2007

AccessDataSource - so easy

AccessDataSource - so easy
As you may or may not know, with ASP.Net v2.0, there are several DataSource controls, like SQLDataSource, and AccessDataSource. The AccessDataSource is even easier to use than the SQLDataSource.

There is no 'ConnectionString' property for the AccessDataSource, but there is a 'DataFile' property. All it requires is a path to the Access Database you want to use:

  Runat="Server"
SelectCommand = "SELECT EmployeeID, LastName, FirstName, Title From NWEmployees"
DataFile="\data\northwind.mdb;">

No comments: