Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
1:1-Mapping zwischen OOo-Calc-Tabelle und SQL-DB-Tabelle
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
sschlueter
Guru
Guru


Joined: 26 Jul 2002
Posts: 578
Location: Dortmund, Germany

PostPosted: Wed Sep 26, 2007 9:12 pm    Post subject: 1:1-Mapping zwischen OOo-Calc-Tabelle und SQL-DB-Tabelle Reply with quote

Der Titel sagt eigentlich alles.

Ich suche eine Lösung, bei der mir der Inhalt einer Datenbank-Tabelle (etwa aus MySQL oder PostgreSQL) in einer Calc-Tabelle angezeigt wird, und zwar mit folgenden zwei Features:

* Der Datenbestand soll auf Knopfdruck geladen/aktualisiert werden können. Also kein CSV-Export aus der Datenbank und Import in Calc.

* Die Tabelle soll noch editierbar bleiben und trotzdem synchron zur Datenbank bleiben, dass heisst, dass Zellen geändert werden können und daraufhin unmittelbar ein UPDATE-Befehl ans DBMS gesendet wird. Analog dazu INSERT und DELETE.

Kennt jemand dazu eine Lösung?
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Wed Sep 26, 2007 10:04 pm    Post subject: Reply with quote

Ich hab ehrlich gesagt keine Ahnung (und glaube auch nur bedingt, dass das geht) - aber hast du schon mal einen Blick auf OOBase geworfen?
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
b3cks
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1481
Location: Bremen (GER)

PostPosted: Thu Sep 27, 2007 5:21 am    Post subject: Reply with quote

Eine fertige Lösung ist mir nicht bekannt. Zumal OOC afaik von Haus aus keine Anbindung zu irgendeiner DB kennt. Müsste man vielleicht mittels einem Makro umsetzen (Python würde sich wohl anbieten). Das wird aber wohl etwas aufwendiger.
_________________
I am /root and if you see me laughing you better have a backup.
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Thu Sep 27, 2007 4:37 pm    Post subject: Reply with quote

Hi,

es geht schon Daten aus z.B. einer MySQL Datenbank einzubinden. Als erstes muss man dafür eine funktionierenden unixODBC Verbindung zu DB haben (ist einfacher als JDBC).

Dazu muss man folgendes installieren:

Code:

$ eix myodbc
[I] dev-db/myodbc
     Available versions:  3.51.06 3.51.11 3.51.12 {debug doc static}
     Installed versions:  3.51.12(18:46:00 26.09.2007)(-debug -doc -static)
     Homepage:            http://www.mysql.com/products/myodbc/
     Description:         ODBC driver for MySQL


Das installiert auch gleich unixODBC mit. Dann sollte man das ganze konfigurieren. Ich hab da mal ein Beispiel wie man z.B. an die mysql-DB mit den Usern/Hosts rankommt:

/etc/unixODBC/odbcinst.ini wrote:

[unixODBC]
Description = ODBC Driver for Unix
Driver = /usr/lib/libodbc.so
Setup = /usr/lib/libodbcinst.so
FileUsage = 1
CPTimeout =
CPReuse =

[MySQL]
Description = MySQL driver
Driver = /usr/lib/libmyodbc3.so
Setup = /usr/lib/libodbcmyS.so
CPTimeout =
CPReuse =
FileUsage = 3


/etc/unixODBC/odbc.ini wrote:

[Data Sources]
myodbc3 = MySQL ODBC 3.51 Driver DSN

[MySQL-test]
Description = MySQL database test
Driver = MySQL
Server = localhost
Database = mysql
Port = 3306
Socket =
Option = 3
ReadOnly = No


Nun sollte man Datenquellen via OpenOffice Base bearbeiten können. Öffnet man nun OOC kann man via Datei->Assistenten->Addressdatenquelle eine neue MySQL-ODBC Datenquelle definieren. Dann kann man via Ansicht->Datenquellen (oder nur F4) die Datenbank und ihre Tabellen sehen und via Drag & Drop in die Tabellen einfügen.

Vielleicht ist das nicht ganz das was du suchst, aber man sollte dann an dieser Stelle weitermachen können :)

MfG. Stefan
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
sschlueter
Guru
Guru


Joined: 26 Jul 2002
Posts: 578
Location: Dortmund, Germany

PostPosted: Mon Oct 01, 2007 6:42 pm    Post subject: Reply with quote

Danke für eure Antworten ;)

Ich habe leider immer weniger freie Zeit, so dass ich momentan nicht sagen kann, wann ich mich wieder damit beschäftigen kann :x
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum