using temporary field exception

jda jda at his.com
Wed Mar 2 07:49:12 CST 2005


>On 3/2/05 2:21 PM, "jda" <jda at his.com> wrote:
>
>Hi Jon,
>
>>  I'm getting an exception when I create and use a temporary field 
>>in a cursor:
>
>I think you mean in the table ?

No, the error occurs when I try to create the cursor.

>
>>  dim fld as VVarChar
>>
>>    fld =
>>  myDatabase.myReferences.createVarCharField("authorEditorSortMethod",
>>  2000, EVFlag.fNone, "IFNULL(authors, IFNULL(editors,title))")
>>
>>  s = "select *,authorEditorSortMethod from thereferences where hit>0
>>  ORDER BY authorEditorSortMethod,thedate"
>>
>>  myCursor = myDatabase.SQLSelect(s, EVCursorLocation.kServerSide,
>>  EVLockType.kReadOnly)
>>
>>  The error is: Field "60" does not exist.
>
>>  fld is created, and seems to be OK.
>>
>>  Anything I'm doing wrong? Or bug?
>
>Try simple query at first
>
>     select authorEditorSortMethod from thereferences

That works.

>
>
>Jon, in 2.0 you can do what you want using SQL itself:
>
>     select *, IFNULL(authors, IFNULL(editors,title)) as 'ff'
>     from thereferences
>     where hit > 0
>     ORDER BY ff, thedate
>
>Please try this also
>

I like this much better! But it gives me the same error: field "60" 
does not exist.

Jon


More information about the Valentina-beta mailing list