Forum > LCL

[SOLVED] TDBDateTimePicker???

<< < (2/3) > >>

Zvoni:
http://www.dbase.com/help/Design_Tables/IDH_TABLEDES_FIELD_TYPES.htm
Have you tried ftTimeStamp or ftFloat instead?
https://www.freepascal.org/docs-html/fcl/db/tfieldtype.html

wp:
This must be a bug in MyDbfStudio then since the following minimal demo shows that the time part of a ftDateTime field is conserved when the table has been created with Tablelevel 7, 25 or 30

1HuntnMan:
Well, my Setup procedure fixed it, so, it's a My Dbf Studio issue.  Thanks all for your suggestions and help.
1HuntnMan aka Donald

1HuntnMan:
WP, do you mean that if in My Dbf Studio, I create a table as Level 7, it supports DateTime when you said the time part is conserved, i.e. it supports DateTime and not just Date?

I created all these tables in this app originally with My Dbf Studio and when you create or restructure it's labeled as Table Level 7.

wp:
I mean: In the test application of my previous post the dbf file contains an ftDateTime field (which contains date and time part). And when i load it into MyDBFStudio that field is correctly reckognized.

However, when I use MyDBFStudio to create a dbf Tablelevel 7 file with an ftDateTime field this field type is not stored correctly. It is only stored as an ftDate field. This can be seen when I load that file into a small application just reading basic field information:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program dbf_info; {$mode objfpc}{$H+} uses  SysUtils, Classes, dbf, dbf_common, db, LazFileUtils; var  Dbf1: TDbf;  i: Integer; begin  if ParamCount = 0 then  begin    WriteLn('Syntax: dbf_info dbffile');    Halt;  end;   Dbf1 := TDbf.Create(nil);  try    Dbf1.FilePath := ExtractFilePath(ParamStr(1));    Dbf1.TableName := ExtractFileName(ParamStr(1));    Dbf1.Open;    WriteLn(  '   dbf file: ', ParamStr(1));    WriteLn;    WriteLn(  'Table Level: ', Dbf1.TableLevel);    WriteLn(  'Fields:');    for i := 0 to Dbf1.FieldCount-1 do      WriteLn('             ', i,        ': "', Dbf1.Fields[i].FieldName,        '"; type ', Dbf1.Fields[i].DataType,        '; size ', Dbf1.Fields[i].Size,        '; required ', Dbf1.Fields[i].Required);  finally    Dbf1.Free;  end;end.
This means there is some issue in MyDBFStudio with table creation.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version