DataModule3.Query1.SQL.Clear;
DataModule3.Query1.SQL.Add( 'SELECT League FROM LEAGUE ');
DataModule3.Query1.Active := TRUE;
if DataModule3.Query1.RecordCount > 0 then begin
DataModule3.Query1.First;
League_No := DataModule3.Query1.Fields[0].AsInteger;
end;
This code used to work just fine, but I've upgraded to Windows XP, and all xxxx broke loose. I've upgraded to MyDAC 4.40 Trial Version (though I own a valid copy of MyDAC -- are there upgrade discounts?), and now I'm getting the following error with above query using a TMyQuery component:
Cannot access field 'League' as type Integer
I'm using MySQL 4.015. I'm using Delphi 7 Professional.
Any help would be greatly appreciated!
Thanks.
Cannot access field 'XXXX' as type Integer
-
craigmadsen
- Posts: 2
- Joined: Sun 24 Sep 2006 00:42
Please specify what type has this field on the server (INT, VARCHAR, etc.) and what class has this field on the client (TIntegerField, TStringField etc.).
On the MySQL database, that particular field is defined as a TinyInt. When using Navicat MySQL to change this field from a TinyInt to an Int, the program went to the next field that was a TinyInt with the same problem. However, when I try to change this field using the same tool, I'm getting an error (which is not a problem with MyDAC.
So as far as this message/topic is concerned, this issue has been resolved.
Thanks,
Craig
On the MySQL database, that particular field is defined as a TinyInt. When using Navicat MySQL to change this field from a TinyInt to an Int, the program went to the next field that was a TinyInt with the same problem. However, when I try to change this field using the same tool, I'm getting an error (which is not a problem with MyDAC.
So as far as this message/topic is concerned, this issue has been resolved.
Thanks,
Craig