Information générale
Catégorie:
Codage, syntaxe et commandes
>I have a table that contains file names for images. I am looking for a way or code that would randomly select the record in the table and from that I would capture the file name and display that particular record.
>
>MyImages.dbf
>image_id (num) primary key
>image_path (memo)
>
>Image_path: contains where the image is located. for example: F:\devserver\app\myimage27.jpg
>
>Is there a way to scan and randomly select a record, capture the image_path and then display that image on a form.
>
>I am using vfp 9.0
>
>thanks in advance
Look at the Help for RAND(). The second example shows how to do a random number from 1-10.
Instead of 1-10 yours would be 1 - number of records in your table then GO TO random number.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement