Skip to content

[X# 3] - DBCreate fails if a fieldname ends with a space #1944

@wriedmann

Description

@wriedmann

When calling DBCreate() with field names that are ending with a space, the function fails.
We are reading our database structure from DBF tables used as dictionary, and we have never trimmed the field names.
With X# 3.0 this does not works anymore.
`function Start as void
local cDBF as string
local cCDX as string
local aFields as array

cDBF := "C:\temp\mytestabs.dbf"
cCDX := "C:\temp\mytestabs.cdx"

RddSetDefault ( "DBFCDX" )
FErase ( cDBF )
FErase ( cCDX )
aFields := { { "TEST      " , "N" , 8 , 0 } } // Error
// aFields := { { "TEST " , "N" , 8 , 0 } } // Error
// aFields := { { "TEST" , "N" , 8 , 0 } }  // OK

DbCreate( cDBF , aFields)
DbUseArea( ,,cDBF )

DbCloseArea()
DbUseArea( ,,cDBF, ,true, true )

        wait
        return`

Metadata

Metadata

Labels

Type

No fields configured for Bug.

Projects

Status

Needs testing

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions