Difference between revisions of "DROP CONNECTION"

From Recital Documentation Wiki
Jump to: navigation, search
(Class)
Line 1: Line 1:
==Class==
 
Data Connectivity
 
  
  

Revision as of 14:14, 23 October 2009


Purpose

Delete a gateway connection file


Syntax

DROP CONNECTION <filename>


See Also

CREATE CONNECTION, REMOTE DATA CONNECTIVITY FUNCTIONS


Description

The DROP CONNECTION command is used to delete a gateway connection file to an external SQL database. Connection files are created by the CREATE CONNECTION command and can be used by the SQLCONNECT() and SQLSTRINGCONNECT() remote data connectivity functions to establish a connection for SQL access to a database.


Keywords Description
filename The name of the gateway connection. If no file extension is specified, then .gtw is used.


Example

// config.db
set sql to vfp
set sql on
// end of config.db
 
CREATE CONNECTION conn1 DATASOURCE "server1" USERID "user1";
  PASSWORD "pass1" DATABASE "/usr/recital/data/demo"
nStatHand = SQLCONNECT("conn1.gtw")
if nStatHand < 1
    dialog box [Could not connect]
else
    nTabEnd = SQLTABLES(nStatHand)
    if nTabEnd = 1
        select sqlresult
        browse
    endif
    SQLDISCONNECT(nStatHand)
endif
DROP CONNECTION conn1


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer