({{, DatabaseDisconnectdb]
deactivates a connection to the database db. }})

OpenersNotesSection(Spacer1)Details

The database db can be specified using (RefLink[DatabaseReference, paclet:ref/DatabaseReference]) or (RefLink[RelationalDatabase, paclet:ref/RelationalDatabase]).

(RefLink[DatabaseDisconnect, paclet:ref/DatabaseDisconnect]) returns a (RefLink[Success, paclet:ref/Success]) object if it successfully disconnected, or a (RefLink[Failure, paclet:ref/Failure]) object.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Connect to an external database:

ref=DatabaseReference[FindFile["ExampleData/ecommerce-database.sqlite"]]

DatabaseConnect[ref]

Check that you are connected:

ref["Connected"]

Disconnect from the database:

DatabaseDisconnect[ref]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[DatabaseConnect, paclet:ref/DatabaseConnect])  ▪  (RefLink[DatabaseReference, paclet:ref/DatabaseReference])  ▪  (RefLink[RelationalDatabase, paclet:ref/RelationalDatabase])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Working with Information in Relational Databases, paclet:guide/WorkingWithRelationalDatabases])}})}})