Hello people,
this are the results of trying to copy *FROM* a dBase file
*TO* an HSQLDB embedded / MySQL database, in Linux with Java UNO bridge.
1. like with the FLAT and OOoCalc SOURCE, only "ConnectionResource" =
"sdbc:dbase:file:///home/ariel/myfile.dbf"
RESULT: CopyTableWizard.createWithInteractionHandler() throws
com.sun.star.lang.IllegalArgumentException: "Only tables and queries are
supported at the moment."
2. in this case, just adding 2 more arguments worked OK:
* "ConnectionResource" = "sdbc:dbase:file:///home/ariel/myfile.dbf"
* "CommandType" = com.sun.star.sdb.CommandType.TABLE
* "Command" = "myfile" , that is the file name without extension
[if in ConnectionResource you pass a FOLDER URL like
"sdbc:dbase:file:///home/ariel/.openoffice.org2/user/database/biblio"
because in this folder there are Data Files (*.dbf) with Memo Field
Files (*.dbt), "Command" must be the name of the file without extension]
RESULT= works OK (but you can not specify connection properties)
3. if you want to use the connection info properties supported by dBase
driver (CharSet and ShowDeleted [?]), only "ActiveConnection" =
XDriverManager.getConnectionWithInfo(URL,
info), where
URL = "sdbc:dbase:file:///home/ariel/myfile.dbf"
info = PropertyValue[] including the CharSet
RESULT: CopyTableWizard.createWithInteractionHandler() throws
com.sun.star.lang.IllegalArgumentException: "Only tables and queries are
supported at the moment."
4. Finally, once again 3 arguments:
* "ActiveConnection" = XDriverManager.getConnectionWithInfo(URL, info)
where
URL = "sdbc:dbase:file:///home/ariel/myfile.dbf"
info = PropertyValue[] including the CharSet
* "CommandType" = com.sun.star.sdb.CommandType.TABLE
* "Command" = "myfile" , that is the file name without extension
[if in ConnectionResource you pass a FOLDER URL like
"sdbc:dbase:file:///home/ariel/.openoffice.org2/user/database/biblio"
because in this folder there are Data Files (*.dbf) with Memo Field
Files (*.dbt), "Command" must be the name of the file without extension]
RESULT: this works too.
A final question: does ShowDeleted have any effect when copying? I mean,
would ShowDeleted be like alsoCopyDeletedRecords? Does not sound
probable. I will have to test.
Regards
Ariel.
--
Ariel Constenla-Haile
La Plata, Argentina
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.arielconstenlahaile.com.ar/ooo/
"Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter."
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]