Ask Your Question
0

How to by pass parameters with direct SQL

asked 2019-09-20 20:45:01 +0100

intmail01 gravatar image

Hi, I am using libo BASE to connect to Postgresql. The code must be sent directly and not be interpreted by Libo Base. But, postgresql can not understand passing parameters with either ? or : syntax eg: select * from agenda where name= ? In this case the code fails with postgresql server.

What are solutions ? cant libo catch one part part of the code just to ask me parameters and bypass other parts?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2019-09-21 04:50:36 +0100

Ratslinger gravatar image

Hello,

Since you bypass the interpreter and the SQL is direct to the database, there is not prompt unless the database provides one.

An alternative is to process a prepared statement in a macro. An example can be found here -> Prepared Statement Question Mark within WHERE LIKE '%?%'. The answer refers to MySQL DB but just tested PostgreSQL with a different SQL statement (form my table/fields) and had no problem. Can add input box so user can enter a value to be selected.

There are possibly other ways to accomplish something but you have not specified how this is to be used.

edit flag offensive delete link more
0

answered 2019-09-22 11:14:15 +0100

intmail01 gravatar image

Thank you. I am learning this macro now I posted 2 other questions if you could make answer: BASE table list, How to display only tables, no other structures BASE importation error, How to cancel all process without asking user

edit flag offensive delete link more

Comments

Please use a comment or edit your question.

m.a.riosv gravatar imagem.a.riosv ( 2019-09-22 18:23:52 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-09-20 20:45:01 +0100

Seen: 39 times

Last updated: Sep 22