ZeosDBO in Lazarus
Moderators: gto, cipto_kh, EgonHugeist
ZeosDBO in Lazarus
Hello,
First of all: Zeos is great! Thanks for keeping it alive and thanks for porting it to Lazarus.
In the latest Lazarus Snapshot with the latest ZeosDBO, the Date field of a ZQuery is always shown as '30/12/1899'.
Long time ago this problem was solved but it seems to be back.
Is there a way to solve this?
BTW, I also posted this problem in the Lazarus forum, but I got no answer so I try it here.
Thanks,
Edwin
First of all: Zeos is great! Thanks for keeping it alive and thanks for porting it to Lazarus.
In the latest Lazarus Snapshot with the latest ZeosDBO, the Date field of a ZQuery is always shown as '30/12/1899'.
Long time ago this problem was solved but it seems to be back.
Is there a way to solve this?
BTW, I also posted this problem in the Lazarus forum, but I got no answer so I try it here.
Thanks,
Edwin
Thank you for your reply.
I checked and it seems that everything is still OK in the Lazarus snapshot of 05/08/2005. This snapshot uses the same FPC version as the latest snapshot, so at least we know the problem is not there.
Do you have any idea if, how and when this problem can be solved?
Thanks,
Edwin
I checked and it seems that everything is still OK in the Lazarus snapshot of 05/08/2005. This snapshot uses the same FPC version as the latest snapshot, so at least we know the problem is not there.
Do you have any idea if, how and when this problem can be solved?
Thanks,
Edwin
-
- Fresh Boarder
- Posts: 22
- Joined: 17.08.2005, 13:09
-
- Fresh Boarder
- Posts: 22
- Joined: 17.08.2005, 13:09
I have a lot of zeosdbo_rework files with pointers and asm fixes... but when I use all of them at the same time I cant install zeos, maybe I mixed something because there were a lot of files that needed pointers fixes... If you tell me wich files contains the date data read/write procedures I'll send you the fixed file for testing
Cheers
Cheers
-
- Fresh Boarder
- Posts: 22
- Joined: 17.08.2005, 13:09
OK I'll take a look at the files today, and do some testing
The 3 files ZAbstractRODaraSet, ZDataSetUtils and ZDbCache have pointers fixes (^) according to my notes...
I'll post the results later
In case I need to upload some files I would be good to have a place even in this same new forum/page to host teh fixed files
Cheers
The 3 files ZAbstractRODaraSet, ZDataSetUtils and ZDbCache have pointers fixes (^) according to my notes...
I'll post the results later
In case I need to upload some files I would be good to have a place even in this same new forum/page to host teh fixed files
Cheers
Hi ruben,rubenjavier wrote:In case I need to upload some files I would be good to have a place even in this same new forum/page to host teh fixed files
if you have completed your fixes you can send me these files, so I can check and add them to cvs.
Regards
Stevie
Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. (Albert Einstein)
-
- Fresh Boarder
- Posts: 22
- Joined: 17.08.2005, 13:09
-
- Fresh Boarder
- Posts: 22
- Joined: 17.08.2005, 13:09
I've done some testing with the new files but the dates still appears as 30/12/1899
I'm working with MySQL and there seems to be another problem with lazarus, I can only create valid dates fields by code sending the command:
ZQuery1.SQL.Text:='INSERT INTO xxx (XXX VALUES ("YYYY-MM-DD")';
ZQuery1.ExecSQL;
By writing the date over a dBGrid it wont let me write the dte with this format, it only accepts (DD/MM/YYY) with "/" instead of "-", any other format its rejected, and when I use this format a New record its created but its value its then "0000-00-00"
????
This 30/12/1899 date problem showed before right? as it with this same version of zeosdbo_rework from CVS?
maybe we should try using lazarus stable 0.9.8 and changing the "override"s that produce errors for "overload"s in ZAbstractRODataset as silvio said.
I'm working with MySQL and there seems to be another problem with lazarus, I can only create valid dates fields by code sending the command:
ZQuery1.SQL.Text:='INSERT INTO xxx (XXX VALUES ("YYYY-MM-DD")';
ZQuery1.ExecSQL;
By writing the date over a dBGrid it wont let me write the dte with this format, it only accepts (DD/MM/YYY) with "/" instead of "-", any other format its rejected, and when I use this format a New record its created but its value its then "0000-00-00"
????
This 30/12/1899 date problem showed before right? as it with this same version of zeosdbo_rework from CVS?
maybe we should try using lazarus stable 0.9.8 and changing the "override"s that produce errors for "overload"s in ZAbstractRODataset as silvio said.
-
- Fresh Boarder
- Posts: 22
- Joined: 17.08.2005, 13:09
the "overload" instead of "override" solution doesn't work, I've installed the 0.98 stable of lazarus and changed all the necessary override's for overload's during the compilation of zcomponent.lpk and then an error jumps out at:
function TZAbstractRODataset.GetFieldData
in the line:
Result := inherited GetFieldData(Field, Buffer, NativeFormat);
*Error: Wrong number of parameters specified
Because there are two procedures GetFieldData one with 2 parameters and the other with 3 parameters and we changed override for overload in their declaration
maybe silvio can tell us how he made it???
cheers
function TZAbstractRODataset.GetFieldData
in the line:
Result := inherited GetFieldData(Field, Buffer, NativeFormat);
*Error: Wrong number of parameters specified
Because there are two procedures GetFieldData one with 2 parameters and the other with 3 parameters and we changed override for overload in their declaration
maybe silvio can tell us how he made it???
cheers
-
- Fresh Boarder
- Posts: 22
- Joined: 17.08.2005, 13:09
Well I've done some more testing and with a version of lazarus from 20050731 it stills works ok, maybe somebody at the lazarus CVS changed something...
What we can do right now is to upload a lazarus version that works for the others to download it
as I said before I posses the version 20050731 win32 installer if anyone can give me place to upload I'll do so
I'm going to try to get the files from this version and put them into a .tar.bz2 overwriting the new ones to make a Linux version with working dates and times...
the problem obviously come from one of the clases used in ZAbstractRODataset, probably in the GetFieldData, SetFieldData, the same functions that presented override errors in previous lazarus versions, this tell us that some of the classes used here were modified between lazarus versions since 0.9.8 to 0.9.9 and then they were modified again in another 0.9.9 version and the classes stoped working correctly
What we can do right now is to upload a lazarus version that works for the others to download it
as I said before I posses the version 20050731 win32 installer if anyone can give me place to upload I'll do so
I'm going to try to get the files from this version and put them into a .tar.bz2 overwriting the new ones to make a Linux version with working dates and times...
the problem obviously come from one of the clases used in ZAbstractRODataset, probably in the GetFieldData, SetFieldData, the same functions that presented override errors in previous lazarus versions, this tell us that some of the classes used here were modified between lazarus versions since 0.9.8 to 0.9.9 and then they were modified again in another 0.9.9 version and the classes stoped working correctly