OpenSQLConnection

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

OpenSQLConnection[]
opens a GUI that helps to make a connection to a data source.

更多信息更多信息

  • To use OpenSQLConnection, you first need to load DatabaseLink using Needs["DatabaseLink`"].
  • The following options can be given:
  • "Description"""textual description of the connection
    "Location"""location of the file that defines the connection
    "Name"""name of the connection
    "Password"""password to use for connecting
    "RelativePath"Falsewhether the connection data contains a relative path
    "Timeout"Nonethe timeout for the query
    "Username"""username to use for connecting
    "Version"Noneversion of the configuration file
    "Catalog"Automaticlocation of the database catalog
    "ReadOnly"Automaticset the connection to be read only
    "TransactionIsolationLevel"Automaticset transaction isolation for the connection

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

基本范例 (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:

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

This uses 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.

New to Mathematica? Find your learning path »
Have a question? Ask support »