Ask Your Question
0

parameter input-Invalid precision value error

asked 2018-03-22 16:20:35 +0200

GRIZZ gravatar image

I've created a query using several fields and LIKE :Searchbox. I have a pushbutton on the form to re-run query as needed.This query runs when my form opens or when pushbutton pressed and displays a Parameter Input window, expecting a value input. If the OK button is pressed without a value, I get error 'Invalid precision value' and the form can no longer run and pushbutton is disabled-must close and restart form. At first I was using ODBC driver and when no data entered on Parameter input window, I would receive error, 'invalid descriptor index'. I read somewhere to change the ODBC driver to MySQL ODBC. When I did I started getting the error 'Invalid precision value' .

If a default value were displayed in the parameter input box (on form load or when pushbutton pressed), I believe the error would not appear. How to set default value on parameter input box?

:using LO v6.0.2.1 ODBC SQL Server driver

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-03-22 17:09:10 +0200

Ratslinger gravatar image

Hello,

There is no way known to me on setting a default for a SQL parameter. However you can do this with a small macro.

The macro obtains the Query and allows the parameter to be filled in with code. If you add an input box with a default value and use that value for the parameter you have an artificial parameter default. Except for the input box line of code, the macro to do this can be found in my answer here: Using Basic macro functions in SQL statements?

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-03-22 16:20:35 +0200

Seen: 43 times

Last updated: Mar 22 '18