Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

beginner in batabase

[b][red]This message was edited by j.haaksma at 2003-9-28 11:41:40[/red][/b][hr]
[b][red]This message was edited by j.haaksma at 2003-9-28 11:38:34[/red][/b][hr]
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...






Comments

  • PerranPerran Posts: 241Member
    : [b][red]This message was edited by j.haaksma at 2003-9-28 11:41:40[/red][/b][hr]
    : [b][red]This message was edited by j.haaksma at 2003-9-28 11:38:34[/red][/b][hr]
    : 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.
  • j.haaksmaj.haaksma Posts: 3Member
    : : [b][red]This message was edited by j.haaksma at 2003-9-28 11:41:40[/red][/b][hr]
    : : [b][red]This message was edited by j.haaksma at 2003-9-28 11:38:34[/red][/b][hr]
    : : 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.




  • ToddryToddry Posts: 2Member
    : : : [b][red]This message was edited by j.haaksma at 2003-9-28 11:41:40[/red][/b][hr]
    : : : [b][red]This message was edited by j.haaksma at 2003-9-28 11:38:34[/red][/b][hr]
    : : : 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.
  • j.haaksmaj.haaksma Posts: 3Member
    : : : : [b][red]This message was edited by j.haaksma at 2003-9-28 11:41:40[/red][/b][hr]
    : : : : [b][red]This message was edited by j.haaksma at 2003-9-28 11:38:34[/red][/b][hr]
    : : : : 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?


Sign In or Register to comment.