Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's wrong with Recordset?
Message
De
10/09/2004 10:44:47
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/09/2004 10:35:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00941045
Message ID:
00941048
Vues:
11
>Hi,
>I try to use Mabry FTP/X control. After calling loFTP.GetDirList() the loFTP.Recordset must contain the files and directories located on ftp server.
>I check next :
>
>?loFTP.Recordset.RecordCount  && - its return -1
>
>I do next
>
>loRecordset = loFTP.Recordset
>loRecordset.MoveFirst()
>DO WHILE .t.
>  ?loRecorset.Fields("Name").Value
>  IF !loRecordset.Eof
>       loRecorset.MoveNext()
>  ELSE
>       EXIT
>  ENDIF
>ENDDO
>
>Whats going wrong? I always see same first record... it seems record pointer stay on first record.
>By the way.. when I bind FlexGrid.DataSource = loRecordsource I can see 7 records..
>
>
>
>Thanks
>Denis

Denis,
Create a clientside cursor (recordcount would then show actual recordcount). Next do not code like that, IMHO :
loRecordset.MoveFirst()
DO WHILE !loRecordset.EOF
  ?loRecordset.Fields("Name").Value
  loRecordset.MoveNext()
ENDDO
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform