FoxInCloud
V 2.28.1-beta.4 hot fix
Dear beta users,
Please apply this fix:
modify command abData.prg
function cFieldExp …
…
lcLen = m.lcLen + Iif(Empty(m.lcLen) or Empty(m.lcDec), '', ',') + m.lcDec
lcResult = m.lcResult + Iif(Empty(m.lcLen), '', '(' + m.lcLen + ')') && << Add this line
endif
…
or download an updated version of V 2.28.1-beta.4
using your notification email.
thanks
I was not notified of version V 2.28.2-beta.4. Or it would be V 2.28.1-beta.5?
Hi Thierry,
I do not locate your code in the function. Can you locate it more precisely please ?
Thanks
OK better replace the whole function…
* ========================================
function cFieldExp && {fr} Expression de champ pour instruction CREATE / ALTER TABLE SQL
lparameters ;
tcField; && aField(1) {fr} Nom du champ ; si @ nom valide en retour
, tcType; && aField(2) {fr} Type de champ selon abréviations VFP C,N,L, etc.
, tuLen; && aField(3) {fr} Longueur du champ
, tuDec; && aField(4) {fr} Nombre de décimales en cas de champ numérique
, tuNull; && [.F.] aField(5) {fr} Valeurs null acceptées; si type # 'L', pas précisé (SET NULL agit)
, tcCheck; && [''] aField(7) {en} Field validation expression
, tcText; && [''] aField(8) {en} Field validation text
, tcDefault; && [''] aField(9) {en} Field default value
, tiAutoIncNext; && [none] aField(17) {en} NextValue for autoincrementing
, tiAutoIncStep; && [none] aField(18) {en} Step for autoincrementing
local lcResult;
, llResult;
, lcLen;
, lcDec;
lcResult = ''
llResult = vartype(m.tcField) == 'C'
assert m.llResult message cAssertMsg(textmerge([Nom de champ invalide : <<cLitteral(m.tcField)>>]))
if m.llResult
tcField = Upper(Alltrim(m.tcField)) && 2016-01-22 thn -- {en} long field names - eg see cCursorSchema() && cVFPName(m.tcField, 10)
llResult = vartype(m.tcType) == 'C'
if m.llResult
tcType = upper(alltrim(m.tcType))
llResult = m.tcType $ VFP9_FIELD_TYPES
endif
assert m.llResult message cAssertMsg(textmerge([Type de champ non supporté par VFP : <<cLitteral(m.tcType)>>]))
if m.llResult
lcResult = Trim(m.tcField + ' ' + m.tcType)
if !m.tcType $ VFP9_FIELD_TYPES_FIXED_LEN and vartype(m.tuLen) $ 'CN'
lcLen = Alltrim(ICase(;
m.tcType = 'B',; && 2017-06-14 thn -- {FiC V 2.25.0-beta.6} {fr} added
'',;
vartype(m.tuLen) = 'C',;
m.tuLen,;
str(m.tuLen);
))
lcDec = ''
if m.tcType $ VFP9_FIELD_TYPES_WITH_DEC and Vartype(m.tuDec) $ 'CN'
lcDec = alltrim(iif(vartype(m.tuDec) = 'C', m.tuDec, str(m.tuDec)))
lcDec = iif(val(m.lcDec) = 0 and !m.tcType == 'B', '', m.lcDec)
endif
lcLen = m.lcLen + Iif(Empty(m.lcLen) or Empty(m.lcDec), '', ',') + m.lcDec
lcResult = m.lcResult + Iif(Empty(m.lcLen), '', '(' + m.lcLen + ')')
endif
lcResult = lcResult + textmerge([];
+ Iif(vartype(m.tuNull) == 'L', [ <<Iif(m.tuNull, 'NULL', 'NOT NULL')>>], '');
+ Iif(ga_Type_IsChar(m.tcCheck, .T.), [ CHECK <<m.tcCheck>>], []); && [''] {en} Field validation expression
+ Iif(ga_Type_IsChar(m.tcText, .T.), [ ERROR <<cL(m.tcText)>>], []); && [''] {en} Field validation text
+ Iif(ga_Type_IsChar(m.tcDefault, .T.), [ DEFAULT <<m.tcDefault>>], []); && [''] {en} Field default value
+ Iif(ga_Type_IsPositiveInteger(m.tiAutoIncNext); && [none] {en} NextValue for autoincrementing
, [ AUTOINC NEXTVALUE <<m.tiAutoIncNext>>];
+ Iif(ga_Type_IsPositiveInteger(m.tiAutoIncStep); && [none] {en} Step for autoincrementing
, [ STEP <<m.tiAutoIncStep>>];
, [];
);
, [];
);
+ [])
endif
endif
return m.lcResult
endfunc
Hi Arcadio,
- Typo in the original message (now fixed): read
V 2.28.1-beta.4
instead ofV 2.28.2-beta.4
- we'll check why the server did not send you the email; done manually, email sent!
It works fine, thanks !