Add bug audit report documenting 16 reviewed issues
Guard TDynamicType.Append against negative or zero length
Fix FuncLeftString crash on negative count argument
Fix FuncSubString buffer overread on out-of-range arguments
Fix memory leak in TCachedFile.PageDeleted on write failure
Fix nil pointer dereference in GetKeyDataFromEntry
Currently the loop in TPagedFile.Read waits infinitely for being able to read from the file. This might be a problem. Therefore I propose to add a LockTimeout with a default of 5 seconds. add a property to the class TDbf Use it to set a similar property of TPagedFile Use that timeout in TPagedFile.Read I have attached the relevant patches.
I have no experience with C++ projects. Sorry.
Hello M. Mueller, I am an old user of the tdbf package, my previous compil was for RAD studio 10.2 tokyo, I just made today the compil for Delphi 12, using the community edition, it works, when I create a new app, I can add the component. in the second step I would like to use the same dcltdbf290.bpl on another machine where I installed the c++builder 12 community edition, After installation, I can see it in the packages list but when I create a c++ project, the component is not available from the...
I just added packages for Delphi 13 and also added it to the dbfcomon.inc file. They compile, but be warned that I have not done any tests.
packages for Delphi 13
added Delphi 13
RecordCount is similar to PhysicalRecordCount and is the physical number of records in the file, including deleted records and records excluded by the filter. For the number of active records, use ExactRecordCount. This can take a while, as it has to filter all records.
var FDB:TDbf; begin FDB:=TDbf.Create(nil); FDB.FilePathFull:='.\'; FDB.TableLevel:=7; FDB.tablename :='test.dbf'; Fdb.FieldDefs.Add('prjid',ftlargeint); Fdb.FieldDefs.Add('no',ftstring,10); Fdb.CreateTable; Fdb.active:=True; Fdb.AppendRecord([3556856671915480078,'1']); Fdb.AppendRecord([3556856671915480078,'2']); Fdb.AppendRecord([3556856671915480017,'3']); Fdb.Filter:='prjid=3556856671915480078'; Fdb.Filtered:=True; DataSource1.DataSet:=FDB; ShowMessage(IntToStr(FDB.RecordCount)); end; filter no...
Fix assertion failure inserting into an index
Remove empty folder accidentally added in r859
Fix bookmarks in Delphi 2009 and higher
I agree with you about the impossibility of solving the problem with small changes. The change I made avoids division by zero but after this operation nothing works anymore. Anyway, thanks for your help
I can reproduce it using this code. Unfortunately, it looks like when you open a table, it can only open the associated memo if it actually exists as a file. I don't think you'll be able to solve it with a minor change like you suggested. We would have to add a feature, and I don't know who has time to do it. Maybe there is a different way you can achieve what you need?
Thank you Giuseppe, I can compile 64 bit platform on Delphi 12.1 with field update now working fine. I added your ifdef code in dbf.pas. I have only to fix DataEvent(deFieldChange, Native(Field)); in DataEvent(deFieldChange, NativeInt(Field));
Thank you Giuseppe, I can compile 64 bit platform on Delphi 12.1 with field update now working fine. I added your ifdef code in dbf.pas.
Thank you Giuseppe, I can compite 64 bit platform on Delphi 12.1 with field update now working fine. I added your ifdef code in dbf.pas.
Thank you Giuseppe, I can compite 64 bit platform on Delphi 12.1 tieh field update now. I added your ifdef code.
This post https://sourceforge.net/p/tdbf/discussion/107245/thread/38240a47/?limit=25#8121 suggested me to to update the dbf.pas file as coded by Giuseppe Costanzo, and now it work fine.
This post https://sourceforge.net/p/tdbf/discussion/107245/thread/38240a47/?limit=25#8121 suggeste me to to update the dbf.pas file as suggestet by Giuseppe Costanzo, and now it work fine.
I've donwloaded the last tDbf 7.01 version, and changed the package for Delphi 10 in order to support version VER360 (Delphi 12). I have simply copyed the block in dbf_common.inc for VER300 and replaced VER300 with VER360 in the copied new block. Then I've compiled in 32bit platform and installed dcltdbf230.bpl. Then I switched to 64bit platform and build the tdbf230.bpl. I've opened the demo project, added 64bit platform, and compiled it. It runs, but if I try to update a record in "simple program",...
I've donwloaded the last tDbf 7.01 version, and changed the package for Delphi 10 in order to support version VER360 (Delphi 12). I have simply copyed the block for VER300 and replaced VER300 with VER360 in the copied new block. Then I've compiled in 32bit platform and installed dcltdb230.bpl. Then I switched to 64bit platform and build the tdbf230.bpl. I've opened the demo project, added 64bit platform, and compiled it. It runs, but if I try to update a record in "simple program", I get error "Project...
Hello This is the code that raises the error when I post the new record: ~~~ constructor TmyClass.create; begin FTable := TDbf.create(nil); FTable.TableName := 'Table.dbf'; FTable.Storage := stoMemory; With FTable do begin Close; TableLevel := 7; Exclusive := True; with FieldDefs do begin clear; add('tag', ftString, 80, False); add('FIELD1', ftMemo, 0, False); add('FIELD2', ftMemo, 0, False); end; CreateTable; Open; AddIndex('idxByTag', 'tag', [ixPrimary, ixUnique]); end; FTable.append; FTable.FieldByName('TAG').AsString...
PtrInt is used two places in dbf.pas for typecasting to a pointer, but in dbf_common.pas it is defined as LongInt. I have changed it (at least locally) to {$ifdef Delphi_XE} PtrInt = NativeInt; {$else} PtrInt = Longint; {$endif} It looks like it fixes the bug here, but has such a bug really been there for a long time? Any comments?
I've encountered a similar issue that I've detailed here. I think your suggested fix should work.
See answer in the thread referenced above.
Is it possible to actually fix it in this non-lazarus version ? So future users can download a version, where it has been changed.
PING. Anybody with rights to make edits, who care to fix this? I have just tested and my application still breaks in the same place as 3 years ago, unless I make the edit listed in my first post.
I had this in the back of my mind since you "pinged". I coincidentally just committed r820 for a different reason, which is similar. Does it take care of your issue?
Yes, it does, thank you. It is in its essence the same fix. I also notice runtime packages in 10.4 carry the name Tokyo. It should be Sydney.
Can you be more specific? I see a tdbf\packages\Delphi104 folder. I don't know where you see "Tokyo".
Inside \packages\delphi104\tdbf.dpk file.
It is correct ({$DESCRIPTION 'TDbf for Delphi 10.4 Sydney'}) in revision 843.
If I download a snapshot, it still contains "Tokyo" for file \packages\Delphi104\tdbf.dpk. It is only \packages\Delphi104\dcltdbf.dpk, which has the "Sydney" text.
What exactly were you steps for "downloading a snapshot"? I think you're looking at old code.
Can you provide a short program that reproduces this? I see the concern with the code, but if RecordSize is 0, there is a bigger issue.
in memory table with memo fields
Fix H2077 Value assigned never used
Fix W1058 Implicit string cast with data loss
Fix W1035 Return value might be undefined
Fix W1057 Implicit string cast
Fix E2003 Undeclared identifier: 'DateSeparator'
add CTOD() function to parser
add date comparison operators to parser
add date literal to parser
Support NULL datetime constant
add AT() function to parser
add DELETED() function to parser
For anyone still reading this post - the component is installed with the existing 'Data Access' components rather than getting a folder for TDBF. The trouble is there is nothing to tell one to look there so it seems like it was not installed when actually it was installed. See my Tutorial for beginners for other hints.
When calling BatchMove the error appears : 'Table#####:Cannot perform this operation on an open dataset' This occurs when using batchmove and am unaware of how to get past the error. It seems to be a bug in that batchmove re-opens the source dataset then tries to create the source dataset file rather than the destination dataset file – which is not allowed of course. The error is caught when Batchmove calls CreateTableEx. The same applies to the procedure CopyFrom as it just calls BatchMove. Can...
Hi, i 'm doing a migration for a projet from XE3 to Delphi11. This project uses tDBF units inside own package named DbfExporation (not components), so i dowload the tDF units for Delphi11. The DbfExporation package builds fine with these new dbf units but the DPR project using this own package doesn't build => i get the message error "F2051 : Unit Exportation was compiled with a different version of dbf.TDbf". Actually this unit have Dbf , Dbf_Lang references in the clause uses but Dbf pointing to...
thanks , a break the standard because it difficult to change all the project the result : (photo attached) original field data = Text test original field type = " W " tDbf detect field type as " C " and it show only the first character !! ,help me please
This seems to be a missing feature. There is no concept of a boolean constant - see TConstant in dbf_prsdef.pas.
This table uses the field type "W", which is not part of the dBASE standard. The trunk of TDbf reports "Invalid file". I don't think we'd want to break the standard, especially without knowing more about what created this file. The best solution is to avoid using dBASE entirely if you are using Unicode.
I would recommend working around this, for now, by disregarding the packages and adding the src folder to your search path. There was only one revision since 2006, it's possible it never worked. The published interface is the same as the fork that comes with Lazarus/FPC, so no harm is done using the TDbf component on a form.
i have dbf file version!!containing field of type ftWideString Tdbf detects it as ftString and shows nothing, any solution
i have dbf file version!!containing field of type ftWideString and size 132 Tdbf detects it as ftString and shows nothing, any solution
i have dbf file version!!containing field of type ftWideString and size 132 Tdbf detects it as ftString and shows nothing, any solution
Is there a more suitable location for this manual?
Here I supply a TDBF Beginners and BDE Migration manual. I am no expert but gather that as a beginner I can see hurdles to TDBF adoption that experts could not. Comments are welcome.
A workaround is to use OnFilterRecord instead as follows: Accept := DataSet.FieldByName('OMIT').AsBoolean = FALSE;
TableInput.Filter:= 'OMIT = FALSE'; Recognizes FALSE as a field
Cannot install TDbf in Lazarus
I don't actually remember doing that, probably was too lazy to look up the compiler version for Delphi 12. Changing it for older Delphi versions doesn't have any benefit really. It is only an advantage when updating to future Delphi versions.
I am happy for all Delphi users who can install tDBF. I use BCB and cannot install tDBF on 11.3 I have tried in many ways but no success. The last version when tDBF worked is 10.2. Is there anyone out there who knows how to make tDBF work with BCB 11.3 and soon 12.0?
Thanks! I see that you are using LIBSUFFIX AUTO. Do we want to use it going back to when it was introduced in RAD Studio Sydney 10.4?
There are now packages for Delphi 12 in the repository. I also added Delphi 12 to the include file, so the packages compile. I haven't done any tests though.
* added Delphi 12 to dbf_common.inc
removed some unnecessary entries
I have created and installed tDBf_c10d.cpp as a new component in 11.3 It went well, no errors, but the created tDBF.bpl does not contain any component! What is wrong?
tDBF for C++ Builder 11.3
What instructions are you following? You are opening packages\Delphi101\tdbf101.groupproj in the IDE? I would right-click tdbf240.bpl, then Build, then right-click dcltdbf240.bpl, then Install. It is trying to install tdbf240.bpl, which makes me wonder whether you clicked the wrong one by accident. I had no problem with the Delphi 11 packages. I compared the Delphi11 folder to the Delphi101 folder and saw no significant differences, so that should work too, but I cannot try to reproduce it because...
I followed instructions for installing TDBF on Delphi 10.1 Berlin I selected the *.groupproj file and compiled from the right click menu Then I Installed the dcltdbf101.bpl from the right click menu. I do not see the TDBF component in the Tool Palette so cannot use it. How do I get it into the Tool Palette? The following may be clues as to what went wrong? Selecting Component>Install Packages, I can see in the Design Package List - TDBF for Delphi 10.1 Berlin and TDBF Delphi 10.1 Berlin runtime but...
Yes, it is fixed now.
For some reason, I cannot see earlier comments in this discussion, so I don't know where I made the mistake, but I do now see what you are referring to. Does r845 fix it for you?
Fix description of Delphi 10.4 Sydney runtime package
https://sourceforge.net/projects/tdbf/ Click "code" Click "download snapshot" That gives me a zip file: tdbf-code-r843-trunk.zip Inside that zip file the tdbf.dpk for delphi 10.4 is from 24-8-2020 dbf.pas is from 3-3-2023
Fix potential Range Check Error getting/setting field value
What exactly were you steps for "downloading a snapshot"? I think you're looking at old code.
If I download a snapshot, it still contains "Tokyo" for file \packages\Delphi104\tdbf.dpk. It is only \packages\Delphi104\dcltdbf.dpk, which has the "Sydney" text.
It is correct ({$DESCRIPTION 'TDbf for Delphi 10.4 Sydney'}) in revision 843.
It is correct ({$DESCRIPTION 'TDbf for Delphi 10.4 Sydney'}) in revision 843.
Inside \packages\delphi104\tdbf.dpk file.
Can you reproduce this in revision 843? I fixed a memo bug in revision 804.
Can you reproduce this in revision 843? I fix a memo bug in revision 804.
I simplified your example, demonstrating what I was suggesting - a console application with one file, the DPR. Here's how I'd request that you simplify it further, so that anyone can reproduce it just by pasting this code in any Delphi version and running it. * Add verification code that raises an exception if the problem occurs. * Create the files we need at runtime using TDbf.CreateTable(), if possible, instead of depending on the test.dbf and test.fpt files you provided. It may not be possible...
compile for 64 bit delphi
Closed due to lack of information.
Empty field evaluated as 0 (zero) when parsed as string
Close due to lack of information.
MDX don't work
MDX files work for me, and the relevant code has changed a lot since the issue was created. So, I am closing this.