wodFtpDLX - GetFiles and LoopItem - WeOnlyDo Discussion board

wodFtpDLX - GetFiles and LoopItem (General questions)

by david.didonato, Thursday, July 21, 2005, 15:33 (7064 days ago)

hi

i use the component.

my problem is:

i have an MS Access Module without form (here is my source):
***************333
Public g_objFTP As wodFtpDLXCom

Function FTP_GetFile() As Boolean

On Error GoTo OnError

FTP_GetFile = False

g_objFTP.RemotePath = /

g_objFTP.GetFiles C:Temp , sRemotePath

FTP_GetFile = True
End Function

***********

How can i activate die EVENT LoopItem without a Form ? i would like to check if is the right file or i must skip the file ?

please help me with a litte example ?

thx
david

Re: wodFtpDLX - GetFiles and LoopItem

by wodSupport, Thursday, July 21, 2005, 15:55 (7064 days ago) @ david.didonato

Sorry, but that's the problem, you must have events, or fast notification interface. GetFiles will not work (correctly) without it.

Perhaps you could change your code by adding a form or a class?

Re: wodFtpDLX - GetFiles and LoopItem

by david.didonato, Thursday, July 21, 2005, 15:59 (7064 days ago) @ wodSupport

i'm a newbie....how can i do that with a class ?

do you have a little example ?

thx
david

Sorry, but that's the problem, you must have events, or fast notification interface. GetFiles will not work (correctly) without it.

Perhaps you could change your code by adding a form or a class?

Re: wodFtpDLX - GetFiles and LoopItem

by wodSupport, Thursday, July 21, 2005, 16:03 (7064 days ago) @ david.didonato

Create new class, at the top declaration add [code]Dim WithEvents Ftp1 as wodFtpDLXCom[/code] and then in class_initialize do [code]Set Ftp1 = new wodFtpDLXCom[/code] you should see now 'Ftp1' on dropdown combo as list of objects in the class. You will also have list of events for it.

Hope it helps.

Re: wodFtpDLX - GetFiles and LoopItem

by david.didonato, Thursday, July 21, 2005, 16:49 (7064 days ago) @ wodSupport

thanks

i change it to a class >> function...but the last problem....

here my source code:

******
Function FTP_GetFile() As Boolean

FTP1.GetFiles C:TEMP , /

FTP_GetFile = True

End Function

Private Sub Ftp1_LoopItem(LocalFile As String, RemoteFile As String, ByVal ItemType As wodFtpDLXComLib.DirItemTypes, Skip As Boolean)
If ItemType = typeDirectory Then
Skip = False
Else
If Right$(RemoteFile, 4) = .txt Then
Skip = False
Else
Skip = True
End If
End If
End Sub
******

now it fired the event loopitem, but i didn't get FILES ?? why ??
anything missing ??

thx
david

Create new class, at the top declaration add [code]Dim WithEvents Ftp1 as wodFtpDLXCom[/code] and then in class_initialize do [code]Set Ftp1 = new wodFtpDLXCom[/code] you should see now 'Ftp1' on dropdown combo as list of objects in the class. You will also have list of events for it.

Hope it helps.

Re: wodFtpDLX - GetFiles and LoopItem

by wodSupport, Thursday, July 21, 2005, 16:50 (7064 days ago) @ david.didonato

David,

I don't know, and I cannot know that. You should debug your code to see if LoopItem event fires, and what happens inside the event in your code.

Re: wodFtpDLX - GetFiles and LoopItem

by david.didonato, Thursday, July 21, 2005, 17:05 (7064 days ago) @ wodSupport

when i start GetFiles it goes to the event loopitem...function perfect...but it doesnt get files...

sorry
david

David,

I don't know, and I cannot know that. You should debug your code to see if LoopItem event fires, and what happens inside the event in your code.

Re: wodFtpDLX - GetFiles and LoopItem

by wodSupport, Thursday, July 21, 2005, 20:39 (7064 days ago) @ david.didonato

David,

cannot happen, files have to be transferred. Perhaps you didn't look at the right place?

Can you zip all of your code that has problems and send it to techsupport@weonlydo.com ? If we could connect to same server as you, and transfer files to same place as you (so we exactly see your problem) that would be very helpfull.