is an object that represents a connection to a data source.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
DatabaseLink`
DatabaseLink`
SQLConnection
is an object that represents a connection to a data source.
Details and Options
- To use SQLConnection, you first need to load DatabaseLink using Needs["DatabaseLink`"].
- OpenSQLConnection and SQLConnections both return an SQLConnection object.
- The following options can be modified in an SQLConnection object:
-
"Catalog" Automatic set the catalog for the connection "ReadOnly" Automatic set the connection to be read only "TransactionIsolationLevel" Automatic set transaction isolation for the connection
Examples
Basic Examples (1)
Needs["DatabaseLink`"]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 "DatabaseLink`DatabaseExamples`" package, as described in Using the Example Databases.
conn1 = OpenSQLConnection["demo"]conn2 = OpenSQLConnection["publisher"]SQLConnections[]This sets the ReadOnly option on one of the connections to True:
SetOptions[conn1, "ReadOnly" -> True]CloseSQLConnection[conn1];CloseSQLConnection[conn2];