Connect to Postgres database using Writer without creating Base file

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?

Thanks.

Hello,

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.