MobileForms Toolkit Documentation

AdvancedComboBox.DbConnector Property

Gets the DbConnector which is defaultly used to load the data.

public DataConnector DbConnector {get;}

Property Value

The DbConnector which is defaultly used to load the data.

Remarks

The default connector is used, if no other DataConnector is provided.

By default, the DbConnector is used to connect to SqlServerCe database. If command text or connection string is set, new SqlCeCommand and SqlCeConnection, or the Command property is accessed, the command is created within the connector. If you want to use other type of access (e.g. Sql direct), you must create the object with the IDbCommand interface (SqlCommand) with the Connection set.

DbConnector exposes property Command, which can be used to manipulate with the command. It is exposed only as IDbCommand, so you have to convert the type to used command (e.g. SqlCeCommand) or use just the IDbCommand properties and methods. This is suitable for e.g. setting existing open connection to command, or manipulating the parameters of the command (see example).

See Also

AdvancedComboBox Class | Resco.Controls.AdvancedComboBox Namespace | DbConnector