Error messge interpretation...

classic Classic list List threaded Threaded
8 messages Options
Michael Tiernan Michael Tiernan
Reply | Threaded
Open this post in threaded view
|

Error messge interpretation...

I have a fairly simple form that queries a DB.

I have a form and a subform.

I "linked" the two fields for the subform and when I execute the form, I
get the error message:

SQL Status: HY000
Error code: 1

parameter marker count incorrect

I assume it should be obvious but I can't figure out where the problem is.

Anyone able to offer a breadcrumb for me to follow?

Thanks for everyone's time.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
TomD TomD
Reply | Threaded
Open this post in threaded view
|

Re: Error messge interpretation...

Hi :)
Is the relationship;
1 to 1
1 to many or
many to 1

Or am i barking up the wrong tree - or just plain barking?
Regards from
a Tom :)


On 17 July 2018 at 14:23, Michael Tiernan <[hidden email]> wrote:

> I have a fairly simple form that queries a DB.
>
> I have a form and a subform.
>
> I "linked" the two fields for the subform and when I execute the form, I
> get the error message:
>
> SQL Status: HY000
> Error code: 1
>
> parameter marker count incorrect
>
> I assume it should be obvious but I can't figure out where the problem is.
>
> Anyone able to offer a breadcrumb for me to follow?
>
> Thanks for everyone's time.
>
> --
> To unsubscribe e-mail to: [hidden email]
> Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-un
> subscribe/
> Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
> List archive: https://listarchives.libreoffice.org/global/users/
> Privacy Policy: https://www.documentfoundation.org/privacy
>

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Robert Großkopf Robert Großkopf
Reply | Threaded
Open this post in threaded view
|

Re: Error messge interpretation...

In reply to this post by Michael Tiernan
Hi Michael,
>
> I "linked" the two fields for the subform and when I execute the form, I
> get the error message:
>
> SQL Status: HY000
> Error code: 1
>
> parameter marker count incorrect

Could be you have written 2 fields for the mainform and one field for
the subform?
Other possibility: There are parameters in the query of the subform. You
have more parameters than connected fields from mainform and subform.

Regards

Robert
--
Homepage: http://robert.familiegrosskopf.de
LibreOffice Community: http://robert.familiegrosskopf.de/map_3


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Michael Tiernan Michael Tiernan
Reply | Threaded
Open this post in threaded view
|

Re: Error messge interpretation...

In reply to this post by Michael Tiernan
On 7/17/18 9:23 AM, Michael Tiernan wrote:
> Anyone able to offer a breadcrumb for me to follow?
Thanks for the suggestions!

I think I've figured out that it's the ODBC setup.

I'm going to go back to the start to make sure I have it right.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Michael Tiernan Michael Tiernan
Reply | Threaded
Open this post in threaded view
|

Re: Error messge interpretation...

I've been banging away at this problem and I don't think the problem is
at the ODBC level but LOs attempts to generate SQL statements correctly.

I don't have the wherewithal to isolate the problem further than to have
seen an error in the code (sqllite SQL request string) so I'm trying to
simplify an example with a subform but that's about the best I can do at
the moment.

Let's get this out of the way:
/*Before anyone states the obvious, the example I'm using is /NOT/ in
need of rewriting, it is an example to prove that there's a problem. It
is a vastly simplified version of a much larger form I was in the
process of building.*/

In short. I simplified the problem so that it is one table that points
to another and it's a one-to-many relationship. The example is a
computer model pointing to installed models.

The LO SQL generated has a strange reference to a link in it that makes
no sense from a SQL point of view.

As far as I can tell the error comes from LO. It is well within reason
that the problem is caused by my incorrect design but it seems a stretch
at this point.

Here's the SQL statement (reformatted) I got in the trace of the ODBC
library call:
SELECT
   "SystemModels"."SystemModel" AS "SystemModel",
   "SystemModels"."SystemMfg" AS "SystemMfg",
   "SystemModels"."SystemMfgName" AS "SystemMfgName"
FROM
   "SystemModels" "SystemModels"
WHERE
   ( "SystemModels"."SystemModel" =:link_from_SystemModel )

That last line has the problem. :(

I'm going to do some tests to see if it really is my form that is
causing it but that seems like a stretch.

Passing this on for general knowledge and in an effort to help others.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Robert Großkopf Robert Großkopf
Reply | Threaded
Open this post in threaded view
|

Re: Error messge interpretation...

Hi Michael,

> Here's the SQL statement (reformatted) I got in the trace of the ODBC
> library call:
> SELECT
>   "SystemModels"."SystemModel" AS "SystemModel",
>   "SystemModels"."SystemMfg" AS "SystemMfg",
>   "SystemModels"."SystemMfgName" AS "SystemMfgName"
> FROM
>   "SystemModels" "SystemModels"
> WHERE
>   ( "SystemModels"."SystemModel" =:link_from_SystemModel )
>
> That last line has the problem. :(

Could be there are Problems with named parameter.
Open The *.odb-file.
Go to Edit → Database → Advanced Settings
Choose "Replaced named poarametr with '?'"

Hope you find "named parameter" there. The menue is different for
different connections.

Regards

Robert
--
Homepage: http://robert.familiegrosskopf.de
LibreOffice Community: http://robert.familiegrosskopf.de/map_3


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Michael Tiernan Michael Tiernan
Reply | Threaded
Open this post in threaded view
|

Re: Error messge interpretation...

Wow! Where'd you find that referenced?

Yes, that fixed the fundamental problem allowing the form to work.

Thank you so very much!

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Robert Großkopf Robert Großkopf
Reply | Threaded
Open this post in threaded view
|

Re: Error messge interpretation...

Hi Michael,

> Wow! Where'd you find that referenced?

Have written this down in German Base-Handbuch, but it isn't translated
yet to English.
Have also found it here:
https://wiki.documentfoundation.org/Faq/Base/004

Regards

Robert
--
Homepage: http://robert.familiegrosskopf.de
LibreOffice Community: http://robert.familiegrosskopf.de/map_3


--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy