C#: string Field [int channel]
VB.NET: Field (channel as integer) as String
(Supported in .NET only)
This runtime property is a wrapper for Datafinds Fields property, to be used with languages that do not support late binding, such as C# or VB.NET with the Option Strict.
Field is the name of a field in the database. For example, in C# a Field property would be referenced using the following syntax:
C#
private void OnEntry(object sender,
AxVBVoiceLib._DDelayEvents_EnterEvent e)
{
string sName = dataFind1.Field["Name",e.channel];
}
Object
This property contains an array of strings, one for each field in the database. Each field object provides access to the value of one of the fields in the database. This example reads the value of the DialNumber field in a database and sets the NumToDial property in the Dial1 control, prefixed with an S. The fields object can contain a maximum of 80 fields.
VB.NET
Dial1.NumToDial(e.channel) = "S" + DataFind1.Fields.DialNumber(e.channel)
DataFind control uses strings to transfer data to and from databases. When writing to a database, its provider does an automatic type conversion for types such as date and time. However, when reading from a database, it is the VB developer's responsibility to do the conversion by assigning the string read to a variable of proper type.
VB.NET
Dim LastUpdateDate as Date
LastUpdateDate = DataFind1.Fields.DialNumber(e.channel)
For data of type Currency, the ODBC providers differ in behavior from the Jet provider. In order to guarantee reading the proper data, when reading a Currency field you should do a conversion in VB code to a number (with a decimal point). If you want to supply this value to the VBVoice system greeting Money, you need to multiply the result by 100 cents because Money ignores the decimal point.
(Supported in .NET only)
C#: string FieldValue [string fieldName, int channel]
VB.NET: FieldValue (fieldNameAs String, channel as integer) as String
This property is a wrapper for the DataFind Fields property. Use it with languages that do not support late binding, such as C# or VB.NET with the Option Strict.
FieldValue is the name of a field in the database. For example, in C#:
C#
private void OnEntry(object sender, AxVBVoiceLib._DDelayEvents_EnterEvent e)
{
string sValue = dataFind1.FieldValue["Name", e.channel];
}
(Integer)
This property will transfer a call to another control. See GotoNode.
(Channel as Integer) Integer
This field contains the number of fields found in the database matching the given specifications. This property works in two different ways, depending on the value of the GetRecordCount property.
If GetRecordCount is False, then RecordCount is set initially to 0 when a call enters the control through the main input and it is incremented for every record scanned by the DataFind control.
If GetRecordCount is True, the record count is calculated as soon as a call enters through the main input, up to a limit of 500. Counting records can be time-consuming in a large recordset and should be avoided if possible.
Note: The RecordCount value is meaningful only after the DataFind.Exit event has fired.
VB.NET
Dim recordNum as Integer
recordNum = DataFind1.RecordCount(e.channel)