Show all found records

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Dec 9 19:59:59 CST 2003


on 12/9/03 7:48 PM, richard z at ximmcom at yahoo.com wrote:

> Does anyone know how the script below can be changed to show all the matching
> records in the search result field (ftitle).

Richard,

1) you ask really newbie question.
    
Look. Function 'on mouseup' simply create Cursor as result of SQL query.
This cursor already contains N found records.

2) You call PopulateFields.

As I understand this is simply COPY of V4MD example.
But you need think what you need for YOUR task and do that.

3) as far as I see you want to know how to display ALL records of cursor.
To do this you need make LOOP on each record of cursor.

Richard, example 001 of V4MD have function that show ALL records of cursor
into MESSAGE window of Director. Please open this example and find this
function.

You need the same.

Again, I can answer you HOW TO EXTRACT records from Cursor.
But rest is up to you.

Where and HOW you want show that Title strings is DIRECTOR question.
Usually for this is used some LIST/TABLE control.

I think Director also have something similar.
Or it is possible to use third party extras.

Let us know if Example 001 help you.


> ---------------------------------------------------
> on PopulateFields
> global gMyDataBase, gCursor
>
> if gMyDataBase = 0 OR gCursor = 0 then
>   return
> end if 
> 
> set the text of member "ftitle" to GetField( gCursor, "title")
> end
> 
> ---------------------------------------------------
> on mouseup
> global gCursor, gMyDataBase
> 
> set kServer = 2
> set kReadWrite = 3
> set kRandom = 2
> set gCursor = 0 
> 
> value = the text of member "searchtitle"
> 
> set SQLstring = "select * from record WHERE title LIKE '\A" & value & "'
> no_case"
> 
> set gCursor = new ( xtra "VCursor", GetRef(gMyDataBase), SQLstring, kServer,
> kReadWrite, kRandom)
> 
> FirstRecord( gCursor )
> 
> PopulateFields
> 
> end
> ---------------------------------------------------

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list