我现在需要用程序生成一个dbf的表,但这个表有120个字段,我发现只要到了40个字典,就会报错delphi record size is too big for table table dose not exist 请问下这个问题该如何解决? function DataExports(NZYH: string; NDataset: tadodataset): Boolean; //雕龙病案首页医保导出 var
NConStr: string; NPath: string; NStr: string; BaseName: string; TableName: string; table: Ttable; begin try table := TTable.Create(nil); table.Close; table.Active := false; table.Exclusive := true; table.TableName := NZYH; table.TableType := ttFOXPRO; with table.FieldDefs do begin Clear; with AddFieldDef do begin Name := 'USERID_'; DataType := ftString; Size := 60; end;
with AddFieldDef do begin Name := 'USERNAME'; DataType := ftString; Size := 60; end; ......... 创建的字段超过40个就会报错
----------------------------------------------
-敢于学习,谦虚学习,鼓励批评!!
Description Open dBASE tables per system (16 Bit) = 256 tables-files Open dBASE tables per system (BDE 3.0 - 4.0, 32 Bit) = 350 tables-files Open dBASE tables per system (BDE 4.01, 32 Bit) = 512 tables-files Record locks on one dBASE table (16 and 32 Bit) = 100 records Records in transactions on a dBASE table (32 Bit) = 100 transactions Records in a table = 1 Billion = 1.000.000.000 Bytes in .DBF (Table) file = 2 Billion = 2.000.000.000 Size in bytes per record (dBASE 4) = 4.000 Size in bytes per record (dBASE for Windows) = 32.767 ---------- Number of fields per table (dBASE 4) = 255 fields Number of fields per table (dBASE for Windows) = 1024 fields ---------- Number of index tags per .MDX file = 47 Size of character fields = 254 chars Open master indexes (.MDX) per table = 10 Key expression length in characters = 220 chars
---------- 如果您愿意,可以使用“主 - 详细信息”技术创建表
在哪里: Master = 将是具有主要字段的表,以与“详细信息”表建立关系
Details = 将是包含其余记录数据的表。
例如:
主表:PERSON = 人 idPerson = integer == 29 <---- Name = 30 characters == Huo V Wu
明细表:PERSON_DOCS = 人员文件 id = integer 1 idPerson = integer == 29 ..... table "PERSON" <---- Driver_Card = string == 123.456.789-0
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
Upload a "zip" with your code complete for analise!
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
procedure TForm1.Button1Click(Sender: TObject); var I, N: Integer; begin with Table do begin DatabaseName := 'D:\Test'; TableName := 'Test.dbf'; TableType := ttSXFOX; DeleteFile(DatabaseName + '\' + TableName); DeleteFile(DatabaseName + '\' + ChangeFileExt(TableName, 'fpt')); N := 200; if not CreateNew(DatabaseName + '\' + TableName, SDEFOX, N) then begin ShowMessage( 'Create failed' ); Exit; end; {CreateField('fchar', 'C', 25, 0); CreateField('fnum' , 'N', 10, 2); CreateField('flog' , 'L', 1, 0); CreateField('fdate', 'D', 8, 0); CreateField('fmemo', 'M', 10, 0);} for I := 1 to N do begin CreateField('F'+I.ToString, 'C', 60, 0); end; if not CreateExec then begin ShowMessage( 'Create failed' ); Exit; end; Open; end; end;
----------------------------------------------
-
The CodeBase(tm) module source code supports several variants of DBF files including the original dBase IV versions, Clipper versions, FoxPro 2.x versions, and Visual FoxPro versions. However, the c4dll.dll version supplied in this distribution was compiled for Visual FoxPro compatibility only. If you need support for Clipper or dBase IV compatibility you can either build the c4dll.dll from the source or contact MPSystemsServices to request the maintainer to do this for you (when he has time).
----------------------------------------------
[alias] co = clone --recurse-submodules up = submodule update --init --recursiveupd = pullinfo = statusrest = reset --hard懒鬼提速https://www.cctry.com/>http://qalculate.github.io/downloads.htmlhttps://www.cctry.com/