Issue 13745 - Unwanted garbage appearing in forms for PostgreSQL data
Summary: Unwanted garbage appearing in forms for PostgreSQL data
Status: CONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: 644
Hardware: PC Linux, all
: P2 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-23 14:30 UTC by bkline
Modified: 2013-08-07 15:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bkline 2003-04-23 14:30:58 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.
Comment 1 marc.neumann 2003-04-24 10:32:52 UTC
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. 
Comment 2 marc.neumann 2003-04-24 11:32:52 UTC
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
Comment 3 ocke.janssen 2003-07-09 12:08:15 UTC
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
Comment 4 hans_werner67 2004-02-02 12:24:08 UTC
change subcomponent to 'none'
Comment 5 thorsten.ziehm 2004-08-19 15:46:47 UTC
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.