Click or drag to resize

DbSqlImageAccessor Constructor (GetConnectionCallback, Boolean, String, String, String)

Creates an object that can be used with DbImageSource to access images stored in a database. The image streams are access by combining clauses of SQL Statements provided.

Namespace:  Atalasoft.Imaging.ImageSources.Data
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
public DbSqlImageAccessor(
	GetConnectionCallback getConnection,
	bool encryptSerializedState,
	string imageField,
	string primaryKeyFields,
	string fromClause
)

Parameters

getConnection
Type: Atalasoft.Imaging.ImageSources.DataGetConnectionCallback
A delegate that can return connections to the database. This accessor must be able to be serialized, so make the delegate to a static method. If this accessor is used in an imagesoruce that is used in ASP.NET controls, then it will be serialized. This class creates SQL statements that use CTE from SQL Server, so the connection needs to be to a database that supports them.
encryptSerializedState
Type: SystemBoolean
True if the serialized state of the object will be encrypted. Please see documentation of sub-classes to see which members are encrypted.
imageField
Type: SystemString
The name of the image field in the data source (given by the FromClause). Can be an expression, but then an "as" with a field name must appear at the end of it.
primaryKeyFields
Type: SystemString
A comma separated list of the primary keys of the data source (given by the
fromClause
).
fromClause
Type: SystemString
The source of the data rows. This would normally be a table name, but it can be anything that can appear in the from clause of a SQL Select statement. It should not contain "from" at the beginning.
See Also