kapcsolódás MSSQL adatbázishoz JTDS-en keresztül OpenOffice.org-al

Összeollózótt megoldás. Persze rohadtul instabil.

1. Open OOo Database and create a new database. Go to Tools>Options and select the Java tab. This should tell you the location of your JRE.

2. Obtain the most recent jtds java archive. Mine is jtds-1.2.2.jar. Copy this jar file into your JRE/lib/ext directory. Mine is located at /usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/ext, but yours may be different.

3. Click the "Class Path" button then on the "Class Path" form click on the "Add Archive" button. Navigate to the location of your jtds.jar file and select it in the file list. Click "Open". Click the "OK" button until all of the open forms are closed.

4. Restart OOo Database.

5. On the Database Wizard, click the radio button entitled "Connect to an existing database", select the JDBC option in the pull down list and click "Next".

In the Datasource URL field type your connection string:

jtds:sqlserver://hostname:portnumber/databasename.

(example: jtds:sqlserver://intranetdb:1433/ourintranet)

In the JDBC driver class field type:

net.sourceforge.jtds.jdbc.Driver

Click "Test class". If you get a message that reads "The JDBC driver was loaded successfully" you are good to go. Click next.

6. Set up your authentication and click Test Connection. You should get "The connection was established successfully". Click "Next".

7. Configure the rest of your options on the final form and click "Finish" Save your database file. You can use this file to open your database connection to Sql Server in the future.

Hozzászólások

Microsoftos driver miért nem jó?

Ehhhhhhh?? Ha a 3-asban ugyis megadod a classpath-ot, minek kell meg be is masolni a ext mappaba? Szedje fel siman valahonnan, a javanak tok mindegy.
Egyebkent meg sztem is probald ki a MS-eset. Megy Linux alatt is.
--


()=() Ki oda vagyik,
('Y') hol szall a galamb
C . C elszalasztja a
()_() kincset itt alant.

Úgyértve barátom hogy az OO.org nem stabil, legalább is nálam. De örültem hogy legalább használható. A JTDS drivert használom natívan, hibernate-tel, JPA-val már jóideje és tette a dolgát, nem volt vele még gond.

De igazából arra amire nelem kell most ez a megoldás (excelben beküldött adatok beimportálása adatbázisba), megfelelőnek tűnik. Hogy mért fagyogyogat azt nem tudom, de nem kenném a jdbc driverrre.