Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
Connection:-Save - save the Connection settings
Calling Sequence
connection:-Save( name, opts )
Parameters
connection
-
Connection module
name
(optional) string; identifier for this connection
opts
(optional) equation(s) of the form option=value where option is one of password, filename, overwrite, or create
Description
Save stores all the information necessary to re-establish connection (with the possible exception of the password) in a file. This connection can be re-established using the LoadConnection command.
Save can store multiple connections within a file by associating each connection with an identifier. If specified, name is used as the identifier. Otherwise, "default" is used as the identifier.
The opts argument can contain one or more of the following equations.
filename = string
The filename option specifies the file in which this connection is saved. When not given, saved connections are placed in $HOME/maple/toolbox/Database/data/default.con, where $HOME is the value returned by kernelopts( homedir ).
create = true or false
The create option controls whether Save creates the directories necessary to save to the default filename. If create is true these directories are created. If it is false they are not. By default, create is false.
overwrite = true or false
The overwrite option controls whether the connection being saved overwrites a saved connection with the same identifier. If overwrite is true the connection is overwritten. Otherwise, it is not. By default, overwrite is false.
password = string or one of the literal symbols none or hidden
The password option controls the storage of a database password. The Database does not store the passwords used to connect to databases unless explicitly told to do so. If no password is stored, you must specify one when calling LoadConnection. By using the password option, you store a password with the connection. This allows the connection to be re-established without entering the password at load time. If a string is given, that string is used as the password. If hidden is given, a Maplet application is opened to allow you to enter your password without it appearing in the worksheet. The default value is none.
Important: The password is stored on disk in plain text.
Along with saving the parameters necessary to re-establish the connection, Save also stores the connection's current settings, as returned by GetOptions. When this connection is loaded these settings will also be used.
The Save command returns nothing.
Examples
Create a connection.
Save the connection to disk using the default file and the default identifier.
Close the connection.
Re-establish the connection saved as default.
Modify this connection's options.
Save using a different identifier and specify the password.
Re-establish the "ac1" connection.
Check this connection's options.
See Also
Database, Database[Connection], Database[Connection][GetOptions], Database[Connection][SetOptions], Database[LoadConnection], Database[usage]
Download Help Document