Bug 60239

Summary: EDITING forms to change data source (PostgreSQL)
Product: LibreOffice Reporter: Andrew Grillet <acgrillet>
Component: BaseAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED INVALID    
Severity: normal CC: acgrillet, iplaw67, robert
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:

Description Andrew Grillet 2013-02-03 15:48:57 UTC
I have developed forms using a Base native table, and now wish to copy and paste them into a new (what do you call it) where I access the live data using PostgreSQL. This does not work. Although the connection works - ie Base can access the correct database on the Psql server, there is no obvious, working way to change how the tabe is accessed in the database. 

There is clearly a major problem with documentation, because it is not clear where various bits of info are stored. In particular, the table and schema that are accessed can, presumably be set somehow, since you can create a base file that accesses the data. 

Unfortunately, there is no reliable way to change the table access. F4 does something, but other than open a window at the top of the screen, not very much that is useful. It certainly does not change the "save" status such that you can save the changes. 

It would be very useful if you could set the entire connection on a per-form basis (ie each form can access a different database). Failing that, the connection dialogue should include another step that sets the schema (defaulting to public). 

Forms should have a visible, editable property that is the table(s) they connect to (permitting the schema to be different (eg schema.table). 

It needs to be possible to remove the request for a user and password when a form that was originally used on PostgreSQL is copied to a native Base database.

Newbies (that's me) need to have it rammed down their throat: which (Base) files contain what (forms, data, indexes, etc), how these (obf, dbf, dbt) are related, and what, if any, requirements about relative placement in the file system hierarchy (eg protential grief with links, removable storage, copying directory hierarchy from Ubuntu to Windows and back). 

Yes, I do want to develop forms on Ubuntu using a native Base file, and deploy them on Windows using PostgreSQL on OpenBSD  - after testing them!

(I believe I am not the only one trying to do this :-)

Feel free to email me if you want more information/ranting/whatever.
Comment 1 Andrew Grillet 2013-02-03 15:50:38 UTC
This is a show-stopper for me!
Comment 2 Robert Großkopf 2013-02-03 20:31:25 UTC
Don't know, if I have understand right.
You have created an internal HSQLDB with Base? 
This database works?
Then you have created for another database a connection to PostgreSQL?
The connection works?
You could create tables in the PostgreSQL-Database?

Best possibility to get help for Base is in the special forum of openoffice. I only know where to find documentation in German language.

Could be we better try to solve the problems per private mail.

Robert
Comment 3 Alex Thurgood 2013-02-11 09:49:12 UTC
(In reply to comment #0)

> It would be very useful if you could set the entire connection on a per-form
> basis (ie each form can access a different database). Failing that, the
> connection dialogue should include another step that sets the schema
> (defaulting to public). 
> 
> Forms should have a visible, editable property that is the table(s) they
> connect to (permitting the schema to be different (eg schema.table). 
> 

TMI : information overload. Your report will likely get closed as INVALID unless you can specify and separate out into distinct elements the individual problems you are encountering - from your description, some of these may well be lack of user knowledge, or indeed as you point out, lack of sufficient documentation, but in that case, you should file a bug report against the documentation and not the database module itself. As for your wishlist of features, well, again, you would need to separate them out.

I am assuming that you have copied your forms by drag and drop from the hsqldb test/replica db ODB file to your postgresql ODB file ?

Once you have done that, you must open the form in Form Design mode, and there, if you right click on a blank area of the form, you can set the link to the underlying db via the Properties context menu entry.

Now, of course, having said all that, it may well be that this doesn't work with your postgres db ODB file, in which case it would seem to be a bug.


Alex
Comment 4 Alex Thurgood 2013-02-11 10:06:46 UTC
(In reply to comment #3)

> 
> Once you have done that, you must open the form in Form Design mode, and
> there, if you right click on a blank area of the form, you can set the link
> to the underlying db via the Properties context menu entry.

Correction to self :
Not a right click on the Form, but the Form properties dialog button appears in the Forms toolbar at the bottom of my screen. If I click on this, I can then define, under the "Data" tab, the table to which I wish to bind the form.

> 
> Now, of course, having said all that, it may well be that this doesn't work
> with your postgres db ODB file, in which case it would seem to be a bug.

Having just tried this, it worksforme against a postgres table after copying a form from a hsqldb ODB having a corresponding table definition.

I am setting this as resolved invalid, unless there is something I appear to have missed or I am unaware of, in which case, please chip in with more specific details.


Alex
Comment 5 Alex Thurgood 2013-02-11 10:08:32 UTC
My test environment :

LO master Version 4.1.0.0.alpha0+ (Build ID: 7e2f34a3172a756a0fd70cae1294250206945a6)

psql 9.1
postgresql-sdbc connector
Linux 32 bit Mint Maya


Alex