ADO Data Object

Overview

In VBVoice, three OLE DB providers are available:

  1. Pronexus VBVoice Linestatus OLE DB Provider

  1. Pronexus VBVoice Statistics OLE DB Provider

  1. Pronexus VBVoice CallDetails OLE DB Provider

These OLE DB providers have tables (defined in section below), and they can be used in data bound controls in Visual Basic 6 or VB.NET.

These providers were tested in Visual Basic 6 using Microsoft ADO Data Control 6.0 and Microsoft DataGrid Control 6.0. In VB.NET, they were tested using DataGrid control.

Available Tables for OLE DB Providers

LineStatus

LineStatus has a row for each channel in the system. Available columns are listed below:

  • LineStatus

  • CallTime (Integer, seconds)

  • LineName (string)

  • UserData1 (string)

  • Status (string)

  • UserData2 (string)

  • ControlName (string)

  • UserData3 (string)

  • ControlTime (Integer, seconds)

  • UserData4 (string)

These are directly equivalent to the fields that appear in the LineStatus display in VBVRLOG and in the remote LineStatus browser integration component. Read more about UserData fields.

ChannelStatistics, GroupStatistics

These two tables contain equivalent information. There is a row in GroupStatistics table for each group and a row in ChannelStatistics for each channel. The first row in each table contains the system total statistics. Available columns are listed below:

Name

CallCount

AvgCallDuration

MinCallDuration

MaxCallDuration

LastCallDuration

AvgCallsPerHour

MinCallsPerHour

MaxCallsPerHour

LastCallsPerHour

AvgUser1

MinUser1

MaxUser1

LastUser1

AvgUser2

MinUser2

MaxUser2

LastUser2

AvgUser3

MinUser3

MaxUser3

LastUser3

AvgUser4

MinUser4

MaxUser4

LastUser4

Call Details

Call details provides access to historical information about every call occurring in VBVoice . These details are stored in the VBVoice log file. The details include start time, duration, unique call ID, and a series of call detail parameters provided by your program.

To add a call detail record, see Call Detail Recording.

When accessing call details from a file, the ADO object will automatically open the next day's file if a call spans midnight.

Call Details Command Strings

To open a log file, an ADO command string is used instead of an SQL Query:
These strings are built using the following format:

/<param1>: <value1>/<param2>: <value2>.../<paramN>: <valueN>

There are 2 command string formats to access call details:

Parameter

Value

Description

file

Filename

Reference to the full path of a log file. If the file contains a partial call log, ADO will attempt to find and load the next day's log to complete it.
To select more than one log file, use path, firstday, lastday and month parameters instead.

path

Pathname

Sets the path to the log folder. By default it is the VBVoice logs directory.
Used in conjuction with firstday, lastday and month to select a group of log files.

firstday

1-31

Sets the first day in the log range to search.
Used in conjuction with path, lastday and month to select a group of log files.

lastday

1-31

Sets the last day in the log range to search.
Used in conjuction with path, firstday and month to select a group of log files.

month

1-12

Sets the month to search in the log range.
Used in conjuction with path, firstday and lastday to select a group of log files.

channel

0-840,all

Selects the channel to search for record. If the parameter is set to 0, all or is omitted, data for all channels will be retrieved. If the channel parameter is omitted, the numdetails parameter must also be omitted.

numdetails

0-4

This parameter should be set to the largest call detail ID used by your application. If the parameter is omitted, call details of type 1 to 4 will be retrieved.

Examples:

Read all the calls made in April 12

/file: C:\logs\vbv12_04.vlg

Read all the calls made in channel 5 in the log file vbv01_13.vlg, and show two levels of call detail ID

/file: C:\vbv4\logs\vbv12_04.vlg/channel: 5/numdetails: 2

Open the records made from September 21 to the 23. Look for the files in the backup folder

/path: C:\Log_Backups\/month: 9/firstday: 21/lastday: 23

ADO Examples

VBVoice provides two examples showing the use of the LineStatus OLE DB Provider.

LinestatusADO: Visual Basic 6

This example uses a Microsoft ADO Data Control 6.0 and a Microsoft DataGrid Control 6.0.

To use the ADO control:

  1. Set the Provider Name to Pronexus VBVoice Linestatus OLE DB Provider

  2. Set the RecordSource to LineStatus

LinestatusADO: .NET

The ADOLineStatus example is written in C#. It uses a DataGrid control to display the data from the Linestatus table.

In order to use a DataGrid control, create a connection to the provider. Use Pronexus VBVoice Linestatus OLE DB Provider as the provider. From that connection, create a data adapter and a data set then use the data set as a source for the data grid.