asp.net.ph

AccessDataSource.ConnectionString Property

System.Web.UI.WebControls Namespace   AccessDataSource Class


.NET Framework version 2.0

Returns the connection string that is used to connect to the Microsoft Access database.

Syntax


Script [ strConnectionParameters ] = AccessDataSource.ConnectionString

Property Value


strConnectionParameters The OLE DB connection string that the AccessDataSource control uses to connect to an Access database, through the System.Data.OleDb .NET data provider.

The property is read only with no default value.

Exceptions


Exception Type Condition
InvalidOperationException An attempt was made to set the ConnectionString property.

Remarks

The AccessDataSource control can be used only with the System.Data.OleDb .NET data provider, and the connection string that the AccessDataSource uses is specific to this provider. Therefore, the AccessDataSource control exposes connection string settings, such as the DataFile property, as a property and constructs a connection string at run time using the values of the ConnectionString property, if set.

While the AccessDataSource control exposes the ConnectionString property because it is inherited from its base class, attempting to set the ConnectionString property results in a NotSupportedException thrown.

See Also

ProviderName Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph