.tcn File

A .tcn file is a text file (an ini file) that corresponds to your book. Media Connection creates the .tcn file when you set the book's Connection Identifier through the Setup Sources window. The .tcn file is in the same directory as the book and is named based on the Connection Identifier. (There is one exception. If Media Connection detects that the .tcn file is read-only, when running off CD for example, it will write any necessary runtime values to a .tcn file in the ToolBook runtime directory.)

 

The .tcn file contains database setup information, source lists, global settings, and other information used by Media Connection. If you are going to let your users change sources at runtime, you must include the .tcn file and your source databases in your installation.

 

Media Connection writes all of these values. You do not need to modify the .tcn file directly unless you use full path names for your database locations; then you must write these locations as part of your installation. See Distributing Your Application for more.

 

The table below describes the contents of a .tcn file for a sample application.

 

.tcn File Entries

 

Explanation

[ODBC]

Provider=MSDASQL

Driver=Microsoft Access Driver (*.mdb)

DriverId=25

Fil=MS Access

ImplicitCommitSync=Yes

MaxBufferSize=512

MaxScanRows=8

PageTimeout=5

SafeTransactions=0

Threads=3

DatabaseTerm=DBQ

 

The [ODBC] section holds information used in connecting to the Access databases.

[sources]

source1=Basketball

source2=Tennis

 

The [sources] section lists the sources defined for the application.

[current]

mediaSource=Basketball

 

The [current] section shows which source is currently active.

[Media Connection]

readAll=true

 

The [Media Connection] section stores selected global settings.

[source Basketball]

Media=databases\sports_basketball_media.mdb

 

[source Tennis]

Media=databases\sports_tennis_media.mdb

 

There is a [source <sourceName>] section for each defined source. Each such section stores the corresponding database location, and passwords and user names (encrypted) if applicable.