MATLAB DATABASE TOOLBOX RELEASE NOTES Guide de l'utilisateur Page 113

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 684
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 112
SQLite JDBC for Windows
2-87
If Database Explorer is docked, click the Close button ( ) to close all database
connections and Database Explorer.
Connect to SQLite using the JDBC connection command line.
1
Create a URL string using the format jdbc:subprotocol:subname. The jdbc
part of this string stays constant for any JDBC driver. subprotocol is a database
type. In this case, subprotocol is sqlite. The last part of the URL string is
subname. For SQLite, this contains the location of the database. For example, your
string is jdbc:sqlite:dbpath, where dbpath is the full path to your SQLite
database on your computer.
2
Connect to the SQLite database by using the database function. Enter the full
path to your SQLite database dbpath for the first argument, or leave this argument
blank and include the full path in the URL string URL. Enter your user name
username and password pwd, or leave these blank if your database does not require
them. The fourth argument is the driver Java class object. This code assumes the
class object is org.sqlite.JDBC. The last argument is the URL string URL.
conn = database(dbpath,username,pwd,'org.sqlite.JDBC','URL');
3
Close the database connection conn.
close(conn)
Vue de la page 112
1 2 ... 108 109 110 111 112 113 114 115 116 117 118 ... 683 684

Commentaires sur ces manuels

Pas de commentaire