Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| utilisateurs:grigouille:brouillons:unixodbc [Le 09/06/2019, 16:08] – [unixODBC] grigouille | utilisateurs:grigouille:brouillons:unixodbc [Le 09/06/2019, 16:43] (Version actuelle) – grigouille | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ---- | ---- | ||
| - | {{ :applications: | + | {{http:// |
| ====== unixODBC ====== | ====== unixODBC ====== | ||
| Ligne 25: | Ligne 25: | ||
| ===== Configuration ===== | ===== Configuration ===== | ||
| ====SQLite3==== | ====SQLite3==== | ||
| - | [[: | + | [[: |
| - | + | <code bash> | |
| - | Tout d'abord, [[:tutoriel: | + | $ cat /etc/odbcinst.ini |
| - | + | [SQLite] | |
| - | ===== Utilisation ===== | + | Description=SQLite ODBC Driver |
| - | + | Driver=libsqliteodbc.so | |
| - | Lancez l' | + | Setup=libsqliteodbc.so |
| + | UsageCount=1 | ||
| + | |||
| + | [SQLite3] | ||
| + | Description=SQLite3 ODBC Driver | ||
| + | Driver=libsqlite3odbc.so | ||
| + | Setup=libsqlite3odbc.so | ||
| + | UsageCount=1 | ||
| + | |||
| + | $ | ||
| + | </ | ||
| + | |||
| + | Vérification <code bash> | ||
| + | $ odbcinst -q -d | grep SQLite | ||
| + | [SQLite] | ||
| + | [SQLite3] | ||
| + | $ | ||
| + | </ | ||
| + | |||
| + | Pour tester, il faut configurer | ||
| + | <code bash> | ||
| + | $ cat ~/.odbc.ini | ||
| + | [test] | ||
| + | Driver=SQLite3 | ||
| + | Database=/ | ||
| + | </ | ||
| + | Remplacer Database par le chemin vers votre base SQLite3 (ou un fichier vide). | ||
| + | |||
| + | Tester | ||
| + | < | ||
| + | $ isql test | ||
| + | +---------------------------------------+ | ||
| + | | Connected! | ||
| + | | | | ||
| + | | sql-statement | ||
| + | | help [tablename] | ||
| + | | quit | | ||
| + | | | | ||
| + | +---------------------------------------+ | ||
| + | SQL> create table aTable(id int); | ||
| + | SQLRowCount returns 0 | ||
| + | SQL> insert into aTable values(10); | ||
| + | SQLRowCount returns 1 | ||
| + | SQL> select * from aTable; | ||
| + | +-----------+ | ||
| + | | id | | ||
| + | +-----------+ | ||
| + | | 10 | | ||
| + | +-----------+ | ||
| + | SQLRowCount returns 0 | ||
| + | 1 rows fetched | ||
| + | SQL> | ||
| + | </ | ||
| + | |||
| + | |||
| ===== Désinstallation ===== | ===== Désinstallation ===== | ||
| Ligne 40: | Ligne 95: | ||
| * **(en)** [[http:// | * **(en)** [[http:// | ||
| - | | + | |
| - | * [[http:// | + | |
| ---- | ---- | ||
| - | // | + | // |
| - | //Basé sur [[http://www.document_source.com|« Titre original de l' | + | //Basé sur [[https://blog.sleeplessbeastie.eu/ |
