Rename Connection, Delete Connection
Create Connection, Modify Connection, Rename
Connection, Delete Connection
These commands let you maintain
connections to remote data sources as part of a database.
Usage
|
CREATE CONNECTION [ ConnectionName | ? ]
[ DATASOURCE cDataSource
[ USERID cUserId ] [ PASSWORD cPassWord ]
[ DATABASE cDatabase ] ]
| CONNSTRING cConnectionString ]
MODIFY CONNECTION [ ConnectionName | ? ]
DELETE CONNECTION [ ConnectionName ]
RENAME CONNECTION OldName TO NewName
|
CREATE CONNECTION lets you either create a connection
totally in code or start the Connection Designer. If you include
a connection name and either the DATASOURCE or CONNSTRING clause,
the connection is created and stored without opening the
Designer. Including DATASOURCE or CONNSTRING without a name
brings up a Save dialog to specify a name. Anything less than
that brings up the Connection Designer. Named connections can be
used both in views and in establishing SQL pass-through
connections. See "Your Server Will Be With You in a Moment" in
Section 1 for more information about connections. In VFP 7, if
the database has database events turned on, the
BeforeCreateConnection and AfterCreateConnection events
fire.MODIFY CONNECTION opens the Connection Designer and lets you
edit the specified connection. The BeforeModifyConnection and
AfterModifyConnection events of the database fire if database
events are turned on.DELETE and RENAME CONNECTION are for
maintenance of connections in a database. They do what their
names say, and fire the BeforeDeleteConnection,
AfterDeleteConnection, BeforeRenameConnection, and
AfterRenameConnection events if database events are turned on.
Example
|
CREATE CONNECTION MyAccessConnection ;
DATASOURCE "MS Access 7.0"
MODIFY CONNECTION MyAccessConnection
RENAME CONNECTION MyAccessConnection TO MoreDignifiedConnection
DELETE CONNECTION MoreDignifiedConnection
|
See Also
|
AfterCreateConnection,
AfterDeleteConnection, AfterModifyConnection, AfterRenameConnection, BeforeCreateConnection, BeforeDeleteConnection, BeforeModifyConnection, BeforeRenameConnection, Create SQL View, DBGetProp(), Display Connections
|
Back to Table of Contents
Copyright © 2002-2018 by Tamar E. Granor,
Ted Roche, Doug Hennig, and Della Martin. Click for license
.