Apache OpenOffice (AOO) Bugzilla – Issue 30678
cannot assign a tablename with XNamed
Last modified: 2007-08-01 09:53:05 UTC
The creation of a database table is not possible when you assign the tablename via XNamed as the following example shows: Sub Main GlobalScope.BasicLibraries.LoadLibrary("Tools") oDBContext = createUnoService("com.sun.star.sdb.DatabaseContext") oDataSource = oDBContext.getByName("Bibliography").getConnection("","").getTables oDataDescriptor = oDatasource.createDataDescriptor() oDataDescriptor.setName("MyTable") oColumns = oDataDescriptor.getColumns() oColumnDescriptor = oColumns.createDataDescriptor() oColumnDescriptor.setName("Mycolumn") oColumnDescriptor.Type = 4 oColumns.appendByDescriptor(oColumnDescriptor) printdbgInfo oColumnDescriptor oDataSource.appendByDescriptor(oDataDescriptor) End Sub If I assign the Name of the column and the table with XPropertySet instead of with "setName" from XNamed everything works fine. As I found a Workaround for my problem there is no need for an urgent bugfix from my point of view.
Hi Berend, the service com.sun.star.sdb.TableDescriptor doesn't support a XNamed. That the implementation supports it, is a implementation detail and can not be used. Best regards, Ocke
Closing.