Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's wrong with Recordset?
Message
From
10/09/2004 10:44:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/09/2004 10:35:12
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00941045
Message ID:
00941048
Views:
10
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform