Delphi and Kylix

Moderators: pritaeas
Number of threads: 7244
Number of posts: 19051

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
beginner in batabase Posted by j.haaksma on 28 Sept 2003 at 11:27 AM
This message was edited by j.haaksma at 2003-9-28 11:41:40

This message was edited by j.haaksma at 2003-9-28 11:38:34

In my app I use a dbgrid and a local foxpro table. ( created using foxpro for dos version 2.6)
In the dbgrid a date field is shown as dd-mm-yy format with the yy being 19 or 20 (the century)
I would like this to be a yyyy format, how do I change this?
shortdateformat and longdateformat don't make a difference
also I have set the fourdigityear in the database engine to true.
no luck either.



Also when deleting a record this record is not really deleted.
It is marked deleted, but the actual record is still there
( for example the table1.recordcount says there is just 1 record while the table1.recno variable shows there are more than 10!)
I looked at cache settings, but can't find the solution

Please help me out here...






Report
Re: beginner in batabase Posted by Perran on 29 Sept 2003 at 4:07 AM
: This message was edited by j.haaksma at 2003-9-28 11:41:40

: This message was edited by j.haaksma at 2003-9-28 11:38:34

: In my app I use a dbgrid and a local foxpro table. ( created using foxpro for dos version 2.6)
: In the dbgrid a date field is shown as dd-mm-yy format with the yy being 19 or 20 (the century)
: I would like this to be a yyyy format, how do I change this?
: shortdateformat and longdateformat don't make a difference
: also I have set the fourdigityear in the database engine to true.
: no luck either.
:
:
:
: Also when deleting a record this record is not really deleted.
: It is marked deleted, but the actual record is still there
: ( for example the table1.recordcount says there is just 1 record while the table1.recno variable shows there are more than 10!)
: I looked at cache settings, but can't find the solution
:
: Please help me out here...
:
:
:
:
:
:
:
Can't help you with the date issue. It might have something to do with your "local" settings in Windoze. Some dbms's don't delete records when you "delete" them. They mark them as deleted so they don't appear in table views, etc. Usually, there is a "pack" command or something similar that will actually take them out [and an "undelete" that will reset the flag]. Look for those.
Report
Re: beginner in batabase Posted by j.haaksma on 1 Oct 2003 at 12:15 AM
: : This message was edited by j.haaksma at 2003-9-28 11:41:40

: : This message was edited by j.haaksma at 2003-9-28 11:38:34

: : In my app I use a dbgrid and a local foxpro table. ( created using foxpro for dos version 2.6)
: : In the dbgrid a date field is shown as dd-mm-yy format with the yy being 19 or 20 (the century)
: : I would like this to be a yyyy format, how do I change this?
: : shortdateformat and longdateformat don't make a difference
: : also I have set the fourdigityear in the database engine to true.
: : no luck either.
: :
: :
: :
: : Also when deleting a record this record is not really deleted.
: : It is marked deleted, but the actual record is still there
: : ( for example the table1.recordcount says there is just 1 record while the table1.recno variable shows there are more than 10!)
: : I looked at cache settings, but can't find the solution
: :
: : Please help me out here...
: :
: :
: :
: :
: :
: :
: :
: Can't help you with the date issue. It might have something to do with your "local" settings in Windoze. Some dbms's don't delete records when you "delete" them. They mark them as deleted so they don't appear in table views, etc. Usually, there is a "pack" command or something similar that will actually take them out [and an "undelete" that will reset the flag]. Look for those.
:

I know, that's the problem , I am looking for a Delphi equivalent of the "pack" command. I havent been able to find anything that resembles this.




Report
Re: beginner in batabase Posted by Toddry on 1 Oct 2003 at 9:14 AM
: : : This message was edited by j.haaksma at 2003-9-28 11:41:40

: : : This message was edited by j.haaksma at 2003-9-28 11:38:34

: : : In my app I use a dbgrid and a local foxpro table. ( created using foxpro for dos version 2.6)
: : : In the dbgrid a date field is shown as dd-mm-yy format with the yy being 19 or 20 (the century)
: : : I would like this to be a yyyy format, how do I change this?
: : : shortdateformat and longdateformat don't make a difference
: : : also I have set the fourdigityear in the database engine to true.
: : : no luck either.
: : :
: : :
: : :
: : : Also when deleting a record this record is not really deleted.
: : : It is marked deleted, but the actual record is still there
: : : ( for example the table1.recordcount says there is just 1 record while the table1.recno variable shows there are more than 10!)
: : : I looked at cache settings, but can't find the solution
: : :
: : : Please help me out here...
: : :
: : :
: : :
: : :
: : :
: : :
: : :
: : Can't help you with the date issue. It might have something to do with your "local" settings in Windoze. Some dbms's don't delete records when you "delete" them. They mark them as deleted so they don't appear in table views, etc. Usually, there is a "pack" command or something similar that will actually take them out [and an "undelete" that will reset the flag]. Look for those.
: :
:
: I know, that's the problem , I am looking for a Delphi equivalent of the "pack" command. I havent been able to find anything that resembles this.
:
:
:
:
:
The four digit year can be set at the dataset (table,dataset or similar)level. Add persistent fields in the dataset by right clicking and entering the fields editor. Right click the field editor and add all fields. The click on the date field that you want to change, the object inspector will show its properties. The is a property called Display Format, this is where you should add your yyyy-mm-dd or whatever you would like to see.
For the delete is there an Apply Updates or UpdateBatch similar event to call to write the changes back to the DBMS.
Report
Re: beginner in batabase Posted by j.haaksma on 5 Oct 2003 at 5:58 AM
: : : : This message was edited by j.haaksma at 2003-9-28 11:41:40

: : : : This message was edited by j.haaksma at 2003-9-28 11:38:34

: : : : In my app I use a dbgrid and a local foxpro table. ( created using foxpro for dos version 2.6)
: : : : In the dbgrid a date field is shown as dd-mm-yy format with the yy being 19 or 20 (the century)
: : : : I would like this to be a yyyy format, how do I change this?
: : : : shortdateformat and longdateformat don't make a difference
: : : : also I have set the fourdigityear in the database engine to true.
: : : : no luck either.
: : : :
: : : :
: : : :
: : : : Also when deleting a record this record is not really deleted.
: : : : It is marked deleted, but the actual record is still there
: : : : ( for example the table1.recordcount says there is just 1 record while the table1.recno variable shows there are more than 10!)
: : : : I looked at cache settings, but can't find the solution
: : : :
: : : : Please help me out here...
: : : :
: : : :
: : : :
: : : :
: : : :
: : : :
: : : :
: : : Can't help you with the date issue. It might have something to do with your "local" settings in Windoze. Some dbms's don't delete records when you "delete" them. They mark them as deleted so they don't appear in table views, etc. Usually, there is a "pack" command or something similar that will actually take them out [and an "undelete" that will reset the flag]. Look for those.
: : :
: :
: : I know, that's the problem , I am looking for a Delphi equivalent of the "pack" command. I havent been able to find anything that resembles this.
: :
: :
: :
: :
: :
: The four digit year can be set at the dataset (table,dataset or similar)level. Add persistent fields in the dataset by right clicking and entering the fields editor. Right click the field editor and add all fields. The click on the date field that you want to change, the object inspector will show its properties. The is a property called Display Format, this is where you should add your yyyy-mm-dd or whatever you would like to see.
: For the delete is there an Apply Updates or UpdateBatch similar event to call to write the changes back to the DBMS.
:
Thanks for the tip, unfortunately the field property "display format" does not show up. Maybe due to the fact that I use an old foxpro 2.6 table?
I saw that all the fields are Tstringfields
maybe I should use a newer table?





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.