sp_DropLink

Advantage SQL Engine

Removes either a local link or a global link from the current connection.

Syntax

sp_DropLink (

Name, CHARACTER, 200,

Global, LOGICAL )

Parameters

Name (I)

The name or path of the link to drop. If the path is given, the first link matching the given path will be dropped.

Global (I)

True to remove the global link alias from the data dictionary. This parameter can only be set to True for a database connection with administrative permissions. If this parameter is True, the Name parameter must specify the link alias in the data dictionary.

Special Return Codes

AE_INVALID_OBJECT_NAME

This error may be returned if the Global parameter is True and the specified link cannot be found in the data dictionary.

Remarks

This function can be used to either drop an active link from the current connection or remove a global link from the data dictionary. Since the database server maintains information on the active links, dropping active links from the current connection will free some resources consumed by the server.

Example

The execution of the following SQL statement creates an implicit link to the ARCHIVE database. The implicit link is then dropped.

SELECT Max(LastDate) FROM "n:\MyData\ARCHIVE\ARCHIVE.ADD\".Table1;

 

EXECUTE PROCEDURE sp_DropLink (

‘n:\MyData\ARCHIVE\ARCHIVE.ADD’,

FALSE );

See Also

sp_CreateLink

sp_ModifyLink