Manolis Christodoulou wrote:
Windows XP, OOo 2.4, MySQL 5.0.51a

I always get an error with forms that contain subforms:

"The data content could not be loaded."...

SQL Status: 42000
Error code: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':link_from_idfield )' at line 1

SELECT * FROM "mydatabase"."datailtable" WHERE ( "idfield" = :link_from_idfield )
Hi Manolis,

It is possible that you are constructing your form/sub-form improperly. The select statement you show above is using a replaceable named parameter ":link_from_idfield" which is proper if you want to have the system prompt you for a value interactively. It is incorrect for use as a sub-form data source.

When building the form you would need only this select statement:

SELECT * FROM "mydatabase"."datailtable"

Then in the form designer you would define the link between the main - sub forms. I take it that in your case the link is something akin to:
"mastertable"."idfield" --> "detailtable"."idfield"

If you are using the form wizard to produce the form there is a page that will prompt for this link. If you are adding the sub-form interactively then you will find the link properties in the sub-form's datacontrol property editor.

HTH

Drew

--
OpenOffice.org User Community Forum: http://user.services.openoffice.org
United States PostgreSQL Association: http://www.postgresql.us/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to