[V4MD] SetField failure

Scott Runkel srunkel at hypix.com
Thu Nov 20 14:22:35 CST 2003


Hi,

I'm going crazy. What is wrong with this code? I'm using the message window just
to illustrate:

* V4MD *: ValentinaSetDebugMode...done
* V4MD *: InitValentina...done
* V4MD *: ValentinaError...done
* V4MD *: new VDatabase...* V4MD *: new VDatabase...done
* V4MD *: OpenDatabase...done
* V4MD *: ValentinaError...done

sql = "select * from sa where year = 1997"

goCursor = new(Xtra "VCursor", GetRef(goDB), sql)
* V4MD *: GetRef...done
* V4MD *: new VCursor...done
put ValentinaError()
* V4MD *: ValentinaError...done
-- 0

put getrecordcount(goCursor)
* V4MD *: Cursor_GetRecordCount...done
-- 271

goToRecord(goCursor, 1)
* V4MD *: Cursor_GoToRecord...done
put ValentinaError()
* V4MD *: ValentinaError...done
-- 0

put getposition(goCursor)
* V4MD *: Cursor_GetPosition...done
-- 1

alltext = "NEWNEWNEW"

put alltext
-- "NEWNEWNEW"

setField(goCursor, "alltext", alltext)
* V4MD *: Cursor_SetField...done
put ValentinaError()
* V4MD *: ValentinaError...done
-- 0

UpdateRecord(goCursor)
* V4MD *: Cursor_UpdateRecord...done
put ValentinaError()
* V4MD *: ValentinaError...done
-- 0
* V4MD *: Cursor_Destroy...* V4MD *: VDatabase_Destroy
...* V4MD *: ShutDownValetina...done

But no matter how many ways/times I try this, nothing is actually added to the
field "alltext". The errors are always 0. Actually I take it back -- it did work
once, sort of randomly, via the message window. But it won't work again. This is
a fully licensed version, so I don't think that's the issue.

Here is the XML dump of that field definition:

- <FieldDesc Name="alltext">
  <Type>Text</Type>
  <Indexed>1</Indexed>
  <Unique>0</Unique>
  <Nullable>0</Nullable>
  <IndexByWords>1</IndexByWords>
  <Compressed>0</Compressed>
  <Language>ASCII</Language>
  <SegmentSize>2048</SegmentSize>
  </FieldDesc>

-SR

Scott Runkel
Director of Technology
503-722-2123




More information about the Valentina mailing list