Board index » delphi » size Mismatch in Tquery with MySql varchar

size Mismatch in Tquery with MySql varchar

Hello !
I'm using D4 with MySql.

I'm  trying to read a table with a Tquery to display in a DbGrid but I
get the following error message :

   'SIZE MISMATCH FOR FIELD 'XXX', EXPECTING 'YYY' ACTUAL 'ZZZ'

Please can anyone Help me ?
Thanks in advance
Jocax

 

Re:size Mismatch in Tquery with MySql varchar


  Do you have persistent fields set up for the query? If so, try removing
them using the fields editor and adding them back in.  This should refresh
the field information.
-Howard

Re:size Mismatch in Tquery with MySql varchar


Hello !
Your suggestion works but
the problem is that I can not recompile the soft every time the  user
change the database

Quote
Howard Moon wrote:
>   Do you have persistent fields set up for the query? If so, try removing
> them using the fields editor and adding them back in.  This should refresh
> the field information.
> -Howard

===============================
Hello !
I'm using D4 with MySql.

I'm  trying to read a table with a Tquery to display in a DbGrid but I
get the following error message :

   'SIZE MISMATCH FOR FIELD 'XXX', EXPECTING 'YYY' ACTUAL 'ZZZ'

Please can anyone Help me ?
Thanks in advance
Jocax

Re:size Mismatch in Tquery with MySql varchar


  If the database changes and you can't recompile to keep the software
up-to-date, then you need to either generate the persistent fields in code
at run-time, or else abandon the use of persistent fields.
-Howard

"Joao Carlos Holland de Barcellos" <jo...@usp.br> wrote in message
news:3CAA08BC.8211C938@usp.br...

Quote
> Hello !
> Your suggestion works but
> the problem is that I can not recompile the soft every time the  user
> change the database

Re:size Mismatch in Tquery with MySql varchar


Hello Howard !
 Andreas give me a tip an it seens work fine  :

I Changed the MyOdbc    checking the box :     "Don't Optimize Column Width"

Its seens  Ok Now !
Thank you Very Much !
Joao Carlos

PS:
Excuse me, I was trying to say the user changed the data inside the DataBank
not the data base it self  ( oh ! My bad English :-(  )

Quote
Howard Moon wrote:
>   If the database changes and you can't recompile to keep the software
> up-to-date, then you need to either generate the persistent fields in code
> at run-time, or else abandon the use of persistent fields.
> -Howard

===================================
Are you sure you're using Tquery and not MyOdbc to access the table?
I had exactly the same problem trying to read a table with MyOdbc,
that problem, however, was easily corrected by setting an checkbox option in
the MyOdbc Configuration box, (Pad char to full length)..

Cheers
/Andreas

Quote

> "Joao Carlos Holland de Barcellos" <jo...@usp.br> wrote in message
> news:3CAA08BC.8211C938@usp.br...
> > Hello !
> > Your suggestion works but
> > the problem is that I can not recompile the soft every time the  user
> > change the database

Other Threads