Re: The number of attributes is larger than the number of attribute values provided (500)
Posted by: Peter Brawley
Date: August 03, 2022 04:36PM

> so far, only this particular sql statement shows this error. I hope it is only this.

If you take out any of the tables from the query, does the error still occur?

It'd be simple to run a simple count(*) query against all tables in your db to find which tables elicit the error.

Does the error occur if you run your query interactively in VFP, or only from your VFP app?

> The statement works in Workbench.

That suggests the issue is due to an incompatibility between VFP and Connector/ODBC. Remember, VFP is 14 years old; the newer the versions of your Connector and MySQL backend, the more likely it is that you'll run into an incompatibility with VFP. If you have Crystal Reports or another app that can connect to MySQL via Connector/ODBC, you could quickly determine whether this issue is specific to VFP.

? set names utf8mb4;
> If ran "set names utf8mb4" in VFP (via ODBC obviously) and it returns this:
> [MySQL][ODBC 8.0(w)Driver][mysqld-8.0.30]SET NAMES not allowed by driver

Ah, I forgot. Yet another reason to avoid ODNC where possible. Dynamic charset settings are often crucial. Did you try adding the charset setting to the connection string?



Edited 1 time(s). Last edit at 08/03/2022 04:38PM by Peter Brawley.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.