DataFind Database Setup

Using a Data Control (VS 6.0 only)

Using a Recordset from Code

Using ODBC

Read more about DataFind control.

DataFind Database Page: Using a Data Control

(Available in Visual Studio 6.0 only)

DataSource Property

When using a bound Data control, the Data control must be set using the DataSource property in the VB properties window. This property must be changed from the Visual Basic Properties window. The DatabaseName and RecordSource properties of the Data control should be set before using this page.

Get these fields

Click Change to select a list of fields from the selected table. The DataFind control gets the actual values of these properties when a call enters the control after moving to the record. If a field is not in this list, it is not accessible from other VBVoice controls and is not available for update from the DataChange or Dial controls. The DataFind control can retrieve a maximum of 80 fields from a table.

Get record count

(GetRecordCount property)

If the Get Record Count box is checked on entry, the record count is calculated as soon as a control enters the main input. Counting records can be time consuming in a large recordset and should be avoided if possible.

Share recordset between all channels

(UseGlobalBookmark)

If this check box is not checked, the DataFind control maintains a bookmark for each channel. This bookmark is used to restore the position for a channel prior to searching for the next record. If this flag is checked, the control maintains one global bookmark, so each channel uses the same position.

EXAMPLE: Using a data control

DataFind1_Enter (....)

using a data control

DataFind1.SetRecSource(channel, Data1.RecordSet)

End Sub

DataFind Database Page: Using Recordset from Code

Use recordset defined by code

If selected, the recordset is created in Visual Basic from code or from a VB Data control.

Get these fields

You must enter a list of fields to be retrieved by the DataFind control, because VBVoice cannot access your database at design time. The list of field names is used to access data from the database and to provide a list of fields that can be updated using the DataChange control.

Edit, New, Delete

Use the New, Edit and Delete buttons to modify the list of fields to be accessed or updated.

EXAMPLE: Using a recordset created in code

DataFind1_Enter (....)

using a data control

DataFind1.SetRecSource(Channel, MyRecordSet)

End Sub

DataFind Database Page: Using ODBC

Open ODBC database

If selected, use this property page to define the recordset you want to search for data in.

Click the browse button ("...") to open the ODBC selection dialog. See Opening a Database Using ODBC for a description of how to create an ODBC data source from an existing database file or directory. Sets the ODBCConnectproperty.

Use this table

(ODBCTable property)

Shows the list of tables available once the ODBC Connect string has been set.

Get these fields

Contains the fields that are retrieved from the database each time it is moved to a new record. These fields can also be updated by a DataChange control.

Filter (SQL)

Specifies an additional SQL statement to the one generated by VBVoice.

For example WHERE [Attempts] = '0'.

Prefix the string with > to completely override the SQL string generated by VBVoice for example

>SELECT [Attempts] FROM [Counts] WHERE [Attempts] = '0'

Snapshot, Dynaset

(RecordsetType property)

The RecordSet types are Snapshot and Dynaset. For a description of recordset types, see Review of RecordSets.

Get Record Count

(GetRecordCount property)

If checked, the DataFind control will count the num�ber of records as soon as a call arrives in the control. This may be useful if you wish to announce the number of items in a database before allowing the caller to choose.

Share Recordset between all Channels

(UseGlobalBookmark property)

If not checked, the DataFind control maintains a book�mark for each channel. This bookmark is used to restore the position for a channel prior to searching for the next record. If this flag is checked, the control maintains one global bookmark, so each channel uses the same position.