OpenSQLConnection
This feature is not supported on the Wolfram Cloud.

OpenSQLConnection[src]
makes a connection to a named data source.

OpenSQLConnection[JDBC[]]
makes a connection to a data source described by a JDBC object.

OpenSQLConnection[]
opens a GUI for creating and managing named data sources.

更多信息更多信息

  • To use OpenSQLConnection, you first need to load DatabaseLink using Needs["DatabaseLink`"].
  • The following options can be given:
  • "Name"""name of the connection
    "Description"""textual description of the connection
    "Username"""username to use for connecting
    "Password"""password to use for connecting
    "Location"""location of the file that defines the connection
    "Catalog"Automaticlocation of the database catalog
    "Properties"{}key-value pairs, as rules, passed to JDBC driver
    "ReadOnly"Automaticset the connection to be read only
    "RelativePath"Falseindicates whether or not database location is specified relative to configuration (for file-based databases)
    "Timeout"$SQLTimeouttimeout setting for operations, in seconds
    "TransactionIsolationLevel"Automaticset transaction isolation for the connection
    "UseConnectionPool"Automaticopen the connection from a managed pool
    "Version"Noneversion of the configuration file

范例范例打开所有单元关闭所有单元

基本范例  (1)基本范例  (1)

In[1]:=
Click for copyable input

If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the package, as described in Using the Example Databases.

Open a connection to a named data source:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input

Open a connection to a data source specified using JDBC:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input

This opens a GUI:

In[6]:=
Click for copyable input
Out[6]=
In[7]:=
Click for copyable input

If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the package, as described in Using the Example Databases.