Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_setdbt() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_SETDBT()

 DESCRIPTION

 The C_SETDBT() function connects and disconnects a DBT file (memo
 file) from it's associated database file.  When a database is
 opened and has an associated DBT file, the DBT file is also opened.
 This is automatic and occurs even if data (a memo field) from the
 DBT file is not needed.  The program incurs the overhead of the DBT
 file buffer and a file handle is used.  C_SETDBT() allows a
 database that has a DBT file to be opened without it, thus, saving
 a file handle and the overhead associated with the DBT file.

 NOTES

 The C_SETDBT() function must be called before an attempt is made to
 open the database file to disconnect the DBT file.  C_SETDBT() must
 be called again after the database file is closed to reconnect the
 DBT file to the database file.

 SYNTAX

 C_SETDBT(dbf, toggle [,network])

 PARAMETERS

 dbf (C) is the name of the database file, including extension, to
 connect or disconnect with the database's DBT file (memo file).
 The drive and directory name may be included with dbf.  If a drive
 and directory name is not specified, the current drive and
 directory is assumed.

 toggle (L) indicates whether the DBT file should be connected or
 disconnected with it's database file.  Specify true (.T.) to
 connect the DBT file to the database file, allowing access to the
 memo fields.  Specify false (.F.) to disconnect the DBT file from
 the database file, allowing no access to the memo fields.

 network (L) indicates whether or not the program is running on a
 network.  If the program is running on a network pass true (.T.) so
 the file can be opened with the proper share access, otherwise pass
 false (.F.).  If network is not specified, the default of false (.F.)
 is used.

 RETURNS

 C_SETDBT() returns true (.T.) if successful, otherwise false (.F.)
 if an error occurred.

 EXAMPLES

 c_setdbt("TEST.DBF", .f.)     && Disconnect DBT file first

 use test                      && Now open test.dbf with no DBT file
 ? c_handles() --> 1           && One file open, DBT is not open
 use                           && Close test.dbf

 c_setdbt("TEST.DBF", .t.)     && Connect DBT file to DBF

 use test                      && Open test.dbf again, but with DBT
 ? c_handles() --> 2           && Two files open, test.dbf & test.dbt


See Also: C_ISDBT() C_HANDLES() C_SETHANDLES() C_MAXHANDLES() C_ISDBF()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson