Ask Your Question

Connect to Postgres database using Writer without creating Base file

asked 2018-12-08 02:14:16 +0200

reuben gravatar image

I would like to add a Data Source to my LibreOffice Writer document. Until now, I was adding a Base file and connecting through it. However it would be nice to remove the dependency on this extra file. There is a tutorial here about connecting with a macro, but it doesn't seem to add a Data Source. Ideas, anyone?


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-12-08 03:17:22 +0200

Ratslinger gravatar image


It appears you may not understand the terms being used. When you add a data source to your Writer document, it has the ability to access the tables in the database directly. You can then retrieve, update, add and delete data and work with it through form controls.

The link provided in your question for the tutorial deals with using a macro to directly access, without Base, a Stored Procedure in a database. See this post for an explanation of Stored Procedures -> What is a stored procedure?. This does work as I have basically tested the same process with code in this post -> Calc: call a stored procedure and just re-tested using the Driver Manager vs the Registered DB.

Therefore, you can connect directly using macros & Stored Procedures but the data is still only in the macro. Now everything previously done for you in the form, you must do through macro coding - move data from result set to fields on form; provide an update mechanism, adding records, deleting records, etc.

I do not believe this is what you are looking for.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-12-08 02:14:16 +0200

Seen: 85 times

Last updated: Dec 08 '18