$fetch from SQLite
Phil Potter (ou)
Phil at pgpotter.demon.co.uk
Tue Aug 5 06:03:00 EDT 2014
Sorry, just had too...
is this a one liner equivalent Bas?
Do
yourList.$cols.$sendall($sendallref.$colsublen.$assign(100000000),($sendallref.$coltype=kCharacter)&($sendallref.$colsublen=0))
I note it clears the list when you do this...
Is this not a problem after the $fetch?
Or is that what you are saying, you copy the definition to the final
result list, run this bit of code to correct the char lengths, then
merge the data into the final list...
regards
Phil.
On 05/08/2014 10:25, Bastiaan Olij wrote:
> Hi Joshua,
>
> I have the same issue in Postgres. I actually copy my list definition
> and then merge lists because I also change the case of columns to get
> around the case sensitivity of column names when you use table classes
> (what a pain) but in theory the following code should work:
> ----
> For lvCol from 1 to yourList.$colcount
> set reference lvRef to yourList.$cols.[lvCol]
> if lvRef.$coltype=kCharacter&lvRef.$colsublen=0
> calculate lvRef.$colsublen as 10000000
> end if
> end for
> ----
>
> Cheers,
>
> Bas
>
> On 5/08/14 6:10 PM, Josua Riha wrote:
>> Good morning,
>>
>> I've noticed that if I $fetch a result set from a SQLite Database into
>> an undefined list the columns seem to have the wrong data lengths.
>>
>> Since SQLite has no length for the data type "TEXT" omnis sets the
>> lenght of the character fields to 0 which makes the fields unusuable.
>>
>> It works if I use a schema class for it, but since I want to use a
>> dynamic column selection I would prefer not to create one for each
>> possible combination of columns.
>>
>> Does anyone has an idea to fix that?
>>
>> Regards,
>> Josua
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>>
>>
>
>
> --
> Phil Potter
> Based in Chester in the UK.
More information about the omnisdev-en
mailing list