Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No. of attributes is larger than no. of attribute values
Message
 
To
03/08/2022 05:19:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01684739
Message ID:
01684767
Views:
28
Hi Dennis,

You test MySQL 8.0.29, but latest version is 8.0.30.
I did try MySQL 8.0.30 and ODBC connector 8.0.30 and number 4000000000 was coverts to string automaticaly (I don't set flag in connection string).

MartinaJ

>Hi Martina,
>
>Already did the changes. It is part of my base class so it is easy on my part.
>
>Also, I think we should really change it since using option=13684 (BIGINT) from MySQL will only convert it to VFP integer data, which we know has a limit.
>
>At least, using option=536870912 gives us the real values; we only need to convert using VAL().
>
>However, my problem still remains:
>
>ERROR [01000] [MySQL][ODBC 8.0(w) Driver][mysqld-8.0.29]The number of attributes is larger than the number of attribute values provided
>
>
>I shall go back to using MySQL ODBC 8.0.30 and Server 5.7.39 for now.
>
>Regards
>Dennis
>
>
>>Hi Dennis,
>>
>>Not is good way, becase you must rewrite your application, if you got datatype char instead number.
>>
>>IMHO, safety is using older ODBC driver.
>>
>>MartinaJ
>>
>>>Hi Martina,
>>>
>>>I changed option=13684 (Treat BIGINT columns as INT columns) to option=536870912 (Bind BIGINT parameters as strings).
>>>
>>>select 4000000000 yielded "4000000000 " -> a 20 character string.
>>>
>>>So I guess option=536870912 is way better?
>>>
>>>Dennis
>>>
>>>
>>>>Hi Denis,
>>>>
>>>>ODBC driver converts number 4000000000 to -294967296?
>>>>
>>>>Hmm,
>>>>
>>>>
>>>>?CAST(4000000000 as int) && return -294967296
>>>>
>>>>
>>>>IMHO, the ODBC driver got 4000000000 as bigint, but VFP don't know bigint datatype and convert to signed int.
>>>>Question is why ODBC driver ignore NO_BIGINT flag?
>>>>
>>>>
>>>>
>>>>select CAST(4000000000 AS DECIMAL(20))
>>>>-- select CAST(4000000000 AS INTEGER) -- converts to bigint - by documentation
>>>>
>>>>
>>>>MartinaJ
>>>>
>>>>>Hi Martina,
>>>>>
>>>>>I tried the different select's you told me to do:
>>>>>
>>>>>
>>>>>select 1
>>>>>select 10
>>>>>select 10000
>>>>>select 4000000000
>>>>>
>>>>>
>>>>>The first 3 yielded the same numbers, except for 4000000000, which yielded -294967296 !!!
>>>>>
>>>>>Why is this so? Pardon my ignorance.
>>>>>
>>>>>Regards
>>>>>Dennis
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform