Remove a saved Connection - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Database Package : Database/RemoveConnection

Database[RemoveConnection] - Remove a saved Connection

Calling Sequence

RemoveConnection( name, opts )

Parameters

name

-

string; the identifier for the connection to remove

opts

-

(optional) an equation of the form filename=string

Description

• 

RemoveConnection deletes the connection associated with identifier name from a file of connections created with calls to Save.

• 

RemoveConnection requires that an identifier be specified.  This differs from Save and LoadConnection.  These functions assume an identifier of "default" if one is not given.

• 

RemoveConnection accepts one optional argument.

  

filename = string

  

used to specify the file from which this connection is removed.  When no filename is given, connections will be loaded from "$HOME/maple/toolbox/Database/data/default.con", where $HOME is the value returned by kernelopts( homedir ).

Examples

Create a connection.

driver:=Database[LoadDriver]:

conn:=driver:-OpenConnectionurl,name,pass:

Save the connection to disk using the default file and the default identifier.

conn:-Save'filename'=connection.con:

Close the connection.

conn:-Close;driver:-Close

Remove this connection.

Database:-RemoveConnectiondefault,'filename'=connection.con:

Attempt to re-establish the connection saved as default.

Database[LoadConnection]password='hidden','filename'=connection.con:

 Error, (in Database:-LoadConnection) no entry named "default" found in connection.con

See Also

Database, Database[Connection], Database[Connection][GetOptions], Database[Connection][Save], Database[Connection][SetOptions], Database[Driver], Database[LoadConnection], Database[usage]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam