Click to Rate and Give Feedback
MSDN
MSDN Library
Visual FoxPro
Reference
Language Reference
Commands
 DELETE CONNECTION Command
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual FoxPro 9.0 SP2
DELETE CONNECTION Command

Deletes a named connection from the current database.

DELETE CONNECTION ConnectionName

Parameters

ConnectionName

Specifies the name of the named connection to delete from the current database.

Deleting a named connection definition does not close any active connections.

DELETE CONNECTION requires exclusive use of the database. To open a database for exclusive use, include EXCLUSIVE in OPEN DATABASE.

The following example assumes an ODBC data source called MyFoxSQLNT is available. The testdata database is opened, and a connection named Myconn is created. DISPLAY CONNECTIONS is used to display the named connections in the database. The connection is then removed from the database with DELETE CONNECTION.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')

CREATE CONNECTION Myconn DATASOURCE "MyFoxSQLNT" USERID "<userid>" PASSWORD "<password>"
DISPLAY CONNECTIONS    && Displays named connections in the database
DELETE CONNECTION Myconn  && Removes the connection just created
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker