[V4MD] Empty field returns <void>, can it return ""?
Bart Pietercil
bart.pietercil at cognosis.be
Tue Sep 23 15:50:23 CDT 2008
On 23 Sep 2008, at 20:44, Irv Kalb wrote:
> Thanks Bart, but I don't understand how to do either of your
> suggestions.
>
> To create a table, I parse through a list of fields and use the
> following to create each string field:
>
> oField = oTable.createStringField(sFieldName, iLength, lFlags)
>
> the value of lFlags is either the empty list [] or if this field is
Maybe you should set the flags to #fNone in order to trigger the
default value for fNullable
>
> intended to be indexed, then it will have the value of [#fIndexed].
>
> I see that there is this additional flag type called #fNullable, but
> it looks like I want the opposite of #fNullable, which I would assume
> would be the default - the empty string.
>
> How do I set a default value using createStringField and/or
> ImportText?
>
good question I didn't find it on the WIKI either
>
>
> The documentation for ImportText contains this comment:
>
> f the cursor represents a subset of the table-fields, then the
> omitted fields will be filled with
> NULL values if the field in NULLABLE or blank values otherwise.
>
> I assume that this is supposed to say:
>
> f the cursor represents a subset of the table-fields, then the
> omitted fields will be filled with
> NULL values if the field is NULLABLE or blank values otherwise.
>
> But that's not what I am seeing. I am seeing empty text fields set
> to VOID.
>
> Confused ...
>
> Irv
>
Maybe try this
in your cursor create sql use the ifnull function like this :
select ifnull(aTextField,"") where..... you get the idea
That should cure the problem (but doesn't resolve the question why
when fNullable is false no "" are returned)
hth
Bart
More information about the Valentina
mailing list