Apache OpenOffice (AOO) Bugzilla – Issue 13745
Unwanted garbage appearing in forms for PostgreSQL data
Last modified: 2013-08-07 15:45:41 UTC
Text controls for character columns of a PostgreSQL table display garbage consisting of the string form of the maximum number of characters allowed for the column. Also confirmed in 1.0.2 and 1.0.3. PostgreSQL 7.3.2-3 unixODBC 2.2.3-6 postgresql-odbc 7.2.5-1 RedHat 9 linux 2.4.20-6 To reproduce: 1. Create a PgSQL table with a primary key and a varchar column. [1] 2. Set up an ODBC data source for the table's database in OOo. 3. Open up the Form AutoPilot. 4. Select the new data source. 5. Select the new table. 6. Add both fields to the form. 7. Finish creating and saving the form. [2] 8. Click the New Record toolbar button. 9. Look at the content of the varchar column. [1] CREATE TABLE t (id INTEGER PRIMARY KEY, name VARCHAR(32)); will do. [2] Any options will do; can use a tabular or single-record form layout. I set the priority at P2 because especially on a form with lots of fields this bug introduces the risk of having garbage data stored in the database.
Hi bkline, this only happend when you use the form wizard. If you look at the control properties of the textcontrol then you see that the default value is set to 32. So if you remove the defaut value the form is work as you want. -> BC: This only happend when you use a Postgres SQL ODBC datasource. Please contact me for more information when you try to reproduce this.
Hi, The problem is neither the form nor the wizard it's the API. - Create a postgres datasource with the name Postgres - create the table t mention in the first description - execute the basic script. ==>> a defaut value is return, but none is set. Sub Main oDBContent = createUnoService("com.sun.star.sdb.DatabaseContext") oDB = oDBContent.getByName("Postgres") handle = createUnoService("com.sun.star.sdb.InteractionHandler") oCon = oDB.connectWithCompletion(handle) Tables = oCon.getTables() Table = Tables.getByName("t") oColumns = Table.getColumns() oColumn = oColumns.GetByName("name") print oColumn.DefaultValue End Sub So I send the Bug to OJ because he is responcible for the API. Bye Marc
Hi, this seems to be a bu of the PostgreSQL ODBC driver. When using version 7.03.01 no default value is returned. Marc, could please verify this, too. Best regards, Ocke
change subcomponent to 'none'
Because of limited resource for OOo2.0, it was decided to shift this tasks to the next milestone. If somebody will be found, who can implement this until OOo2.0, then this tasks will be re-targeted.