Invalid descriptor Index 07009 when using a query parameter?

Good day all,

I'm trying to query a MySQL Database (Ver 14.14 Distrib 5.5.22 for
debian-linux-gnu (i686) using readline 6.2) for purposes of generating a
report in OpenOffice Base (3.5.3.2 Build ID 350m1 (Build:2)).

I am connecting via ODBC, and my /etc/odbc.ini looks like this:

[DESP]
Driver = /usr/lib/i386-linux-gnu/odbc/libmyodbc.so
Description = MyODBC 3.51 Driver DSN
SERVER = localhost
PORT =
USER = root
Password = XXXXX
Database = DigitalEditionsSolution
OPTION = 3
SOCKET =

My query has one parameter, and it ends up giving me an error unrelated to
the syntax:

SELECT dfw.fk_desp_id, dfw.fk_dfws_id, dfw.Features_f_id, desp.name AS
DESP_Name, f.name AS FeatureName, dfws.name As ResponseState
FROM
DESP_Feature_Weak_State dfws RIGHT OUTER JOIN
(DigitalEditionsSolutionProvider desp INNER JOIN (Features f INNER JOIN
DESP_Features_Weak dfw ON f.f_id = dfw.Features_f_id) ON desp.desp_id =
dfw.fk_desp_id) ON dfws.dfws_id = dfw.fk_dfws_id
WHERE desp.desp_id=:despnum AND
(f.name="auto-linking-of-email-addresses:yes" OR
f.name="auto-linking-of-urls:yes" OR f.name="newsstandsupport:yes")
ORDER BY fk_desp_id;

When I run the above query, and enter my named parameter, it returns with
three errors:
- The data content could not be loaded
- SQL Status: 07009

   Invalid descriptor index

- You tried to set a parameter at position '1' but there is/are only '0'
parameter(s) allowed. One reason may be that the property
"ParameterNameSubstitution" is not set to TRUE in the data source.

I found a thread on google concerning this same error in which someone said
checking off all of the Edit->Database->Advanced Settings options would
cause it to work, but I tried that, and even restarted Base, with out any
success, leading to the same error.

Thank you,
   Andrew J. Leer

In Ubuntu (and I assume Debian) there is a LO-MySQL specific connector
package available via Synaptic. The error, from what I am able to find
out, is problem with the odbc connector.

Jay,

thank you for your reply,

Is the LO-MySQL specific connector the same as the MySQL ODBC driver? Or
would it be something I could use in place of it?

I have relatively the same setup on a Windows machine that I have, and it's
ODBC seems to be able to handle parameters in MySQL.

Thanks again,
   Andrew J. Leer

Hi,

- You tried to set a parameter at position '1' but there is/are only '0'
parameter(s) allowed. One reason may be that the property
"ParameterNameSubstitution" is not set to TRUE in the data source.

I found a thread on google concerning this same error in which someone said
checking off all of the Edit->Database->Advanced Settings options would
cause it to work, but I tried that, and even restarted Base, with out any
success, leading to the same error.

Yes, that should've done the trick, but recent versions of the 3.51.x
ODBC driver supplied by MySQL/Oracle are unfortunately somewhat buggy,
and from experience such bugs can go unfixed for rather long periods of
time. Nothing to do with LibreOffice either, generally.

Alex

Is there a place I can submit the bug?

Jay,

thank you for your reply,

Is the LO-MySQL specific connector the same as the MySQL ODBC driver? Or
would it be something I could use in place of it?

The Ubuntu repository list a specific libreoffice-mysql-connector. I
assume it is different than the standard MySQL ODBC driver which I
understand is for use with ODBC complaint front-end.

Hi,

Is there a place I can submit the bug?

I would try here :

http://bugs.mysql.com/

Alex

Hi,

Is the LO-MySQL specific connector the same as the MySQL ODBC driver? Or
would it be something I could use in place of it?

They are different, and you can use it in place of the ODBC driver.
However, I note that you mention parameter substitution - I have not
been able to get this to work with my queries (which require direct SQL
execution, rather than parsing via LO's parser) and the native mysql
connector. Perhaps I'm just doing something wrong, but it has simply
never worked for me with the native mysql connector - I seem to recall
that it did with the ODBC driver though.

Alex

Hi :slight_smile:
There are 2 good links to help people post bug-reports
http://wiki.documentfoundation.org/BugReport
https://www.libreoffice.org/get-help/bug/
I think you will find the first one, the wiki one, is more useful to you for reporting this
Good luck and regards from
Tom :slight_smile:

Okay for anyone who's interested I submitted the bug here:
http://bugs.mysql.com/bug.php?id=65832&thanks=sub

Enjoy!

I also posted it here:
https://www.libreoffice.org/get-help/bug/

Hi :slight_smile:
Nicely done :slight_smile:

The subsequent link you gave was a link to the LO form to fill-in rather than to the specific bug-report you created.  Ideally it would be great to have a link to the specific bug report in the one posted to the other project, eg
In the MySql report a link given to the report submitted to LO &
In the LO report a link given to the MySql one.

It helps if the devs can get their heads together more easily rather than just blaming the other project ;)  I'm not sure devs do that but most people would in similar circumstances. 
Regards from
Tom :slight_smile: