[VREV] showing results

Ivan Smahin IvanSmahin at public.kherson.ua
Thu Oct 6 10:16:32 CDT 2005


Hello ron,

Thursday, October 6, 2005, 7:39:21 AM, you wrote:

rb> Hi Ruslan,

rb> I am just now starting to implement V4REV 2 into my existing app and I
rb> am struggling a little with the learning curve of the new syntax. Bear
rb> with my ignorance.

rb> 1.  In v 1.0 I used things like:
rb> put Valentina("DataBase_SQLSelect",dbRef,theSQL) into cursorRef
rb> put Valentina("Cursor_GetRecord",CursorRef,10) & return after newtext

rb> or like:
rb> put Valentina("DataBase_SQLSelectRecords",dbRef,theSQL) into newtext

rb> SQLSelectRecords returned the actual text of the records
rb> SQLSelect returned a cursorref which GetRecord could then return the
rb> text of the records.

rb> In v 2.0 I am using
rb> put VDatabase_SqlSelect(dbRef,theSQL) into cursref

rb> This of course gives me a reference to a cursor but how do I show the
rb> records?  This is so basic but I have looked at arraysets, and moving
rb> up and down the records but have been unsuccessful. I have spend time
rb> with the tutorials and the references but ignorance has clouded my
rb> mind. Thanks for your help.

You could use something like this:
  ...
  put VDatabase_SqlSelect(dbRef,theSQL) into cursref
  put VCursor_FieldCount( cursref ) into fldCount
  put VCursor_RecordCount( cursref ) into rowCount
  
  repeat with i = 1 to rowCount
    repeat with j = 1 to fldCount
      put VCursor_Field( cursref, j ) into fldRef
      put VField_Value( fldRef ) into fldValue
      ...

    end repeat

    get VCursor_NextRecord(inCursorRef)
  end repeat
  ...

rb> 2. You said about system encoding:
>> Note, you cannot send here only UTF16, because Rev external cannot use
>> this.
>> You should also convert it to UTF8.

rb> My plan is to make a valdb with UTF16 and read/search it directly from
rb> REV through Val. Is this not possible?

The problem is to send UTF-coded string to the V4REV extra(plugin).
Actually  the Revolution's external-SDK is "char-pointer-string based".
So the only way for now - to do it like IOEncoding example shows.



-- 
Best regards,
 Ivan                            mailto:IvanSmahin at public.kherson.ua



More information about the Valentina-beta mailing list