[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
DBNetUse()
Use a database on the network.
-------------------------------------------------------------------------------
Syntax:
DBNetUse( [<lNewArea>], [<cDriver>], <cName>, [<xcAlias>],
[<lShared>], [<lReadonly>] ) --> <lSuccess>
Arguments:
<lNewArea> is an optional logical value. A value of true (.T.)
selects the lowest numbered unoccupied work area as the current work
area before the use operation. If <lNewArea> is false (.F.) or omitted,
the current work area is used; if the work area is occupied, it is
closed first.
<cDriver> is an optional character value. If present, it specifies
the name of the database driver which will service the work area. If
<cDriver> is omitted, the current default driver is used (see note
below).
<cName> specifies the name of the database (.dbf) file to be opened.
<xcAlias> is an optional character value. If present, it specifies
the alias to be associated with the work area. The alias must
constitute a valid CA-Clipper identifier. A valid <xcAlias> may be any
legal identifier (i.e., it must begin with an alphabetic character and
may contain numeric or alphabetic characters and the underscore).
Within a single application, CA-Clipper will not accept duplicate
aliases. If <xcAlias> is omitted, a default alias is constructed from
<cName>.
<lShared> is an optional logical value. If present, it specifies
whether the database (.dbf) file should be accessible to other processes
on a network. A value of true (.T.) specifies that other processes
should be allowed access; a value of false (.F.) specifies that the
current process is to have exclusive access. If <lShared> is omitted,
the current global _SET_EXCLUSIVE setting determines whether shared
access is allowed.
<lReadonly> is an optional logical value that specifies whether
updates to the work area are prohibited. A value of true (.T.)
prohibits updates; a value of false (.F.) permits updates. A value of
true (.T.) also permits read-only access to the specified database
(.dbf) file. If <lReadonly> is omitted, the default value is false
(.F.).
Returns:
DBNetUse() returns logical indicating success.
Description:
DBNetUse() associates the specified database (.dbf) file with the
current work area. If an error occurs during the open process, an
an Alert() message is displayed requesting the user to retry or abort.
DBNetUse() performs the same function as the standard NETUSE command.
For more information, refer to the NETUSE command.
Notes:
. Current driver: If no driver is specified in the call to
DBNetUse() the default driver is used. If more than one driver is
available to the application, the default driver is the driver
specified in the most recent call to DBSETDRIVER(). If DBSETDRIVER()
has not been called, the name of the default driver is undetermined.
Examples:
. This example is a typical use of the DBNetUse() function:
DBNetUse(.T., "DBFNDX", "Employees")
Files: Library is CUACLIP.LIB
See Also:
NETUSE
DBNetClose()
EX1.PRG
EX3.PRG
EX5.PRG
MISC.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson